I am working on a cross-platform app and trying to implement google ad mobs, but google and firebase do not include an instructions list for Xamarin, only for Swift. Any ideas of what would be best to add ads?
Thank you!
Following either of these tutorials will work. Just change the iOS code, in AppDelegate to
`MobileAds.Configure("Your App ID");
Firebase.Core.App.Configure();
MobileAds.SharedInstance.Start(completionHandler);
MobileAds.SharedInstance.RequestConfiguration.TestDeviceIdentifiers = new string[] {"kGADSimulatorID", "Your Device ID" };`
to find your device ID, leave the test device identifiers blank, and the console will spit it out at you.
Related
I'm new to Xamarin.Forms and I'm looking for an updated tutorial link or document that shows how to get Firebase Authentication working with Xamarin.Form or if someone can supply a GitHub link with an example of how to get firebase auth working on Xamarin.forms with Visual Studios 2019?
Note: I've followed the tutorial from https://medium.com/firebase-developers/firebase-auth-on-xamarin-forms-171432aa3d76 but it doesn't work.
I have this link for you.
https://evgenyzborovsky.com/2018/03/26/firebase-authentication-in-xamarin-forms/
Try it and let me know if it will be working or not.
this one really helped me, it is a perfect example
https://github.com/saipedireddi1/xamarin-example
using FirebaseAuthentication.net nugget
I work on Share Extension. And it only has a sample project (following link) and a general extension documentation.
Basic project:
Extension documentation:
When I click share with my app on iphone (for example on photos), I want to send this file to my app and upload it remote server. But I couldn't find anyway to send object from share extension. I looked up and probably I need to use "NSUserDefaults" and I tried to use it that:
I did necessary settings (creating group id, app id etc) on my apple developer account.
I did necessary settings on my project Entitlements.plist
I try to send on ShareViewController - DidSelectPost method in the my project's share extension as below:
var default = new NSUserDefaults ("group.com.myapp.AppName", NSUserDefaultsType.SuiteName);
default.SetString ("Test content", "TestKey");
default.Synchronize ();
4)I try to receive string data on my main project's AppDelegate as below:
var default = new NSUserDefaults ("group.com.myapp.AppName", NSUserDefaultsType.SuiteName);
var key = default.StringForKey ("TestKey");
string value = key;
But I couldn't do it. And I saw someone did this with OpenUrl function. I tried this and this didn't work.
I started mobile programming with Xamarin forms and I don't know enough native iOS programming (I only learn with Xamarin). I think share extension has insufficient documentation.
I want to store the username and password of users locally. i have searched a lot can't find a working solution for Xamarin.forms.I have seen this official site that recommend to use Xamarin.Auth to store in keychain but the tutorial in on platforms specific which i dont know how to convert to Xamarin.Forms.
A little bit help on how to make this to work in Xamarin.Form is very much appreciate.
I have been using the SecureStorage plugin which saves these kinds of settings in the platforms secure storage from the shared code.
There are a couple of things good to know.
iOS
On the Simulator you could run into an issue where values do not get saved. To overcome this open the Entitlements.plist file and make sure that "Enable Keychain Access Groups" is checked. Also ensure that in Project->Options->iOS Bundle Signing, the Entitlements.plist is selected in Custom Entitlements for iPhoneSimulator platform.
Android
You have to set a password when initialising, like this:
SecureStorageImplementation.StoragePassword = "Your Password";
This will be used to encrypt te settings. Make sure you keep it secret and do not change it.
Windows
Same thing as Android, but now call WinSecureStorageBase.StoragePassword = "Your password";
If you have done this, you can now save any setting your like with:
CrossSecureStorage.Current.SetValue(“SessionToken”, “1234567890”);
Which can then be retrieved like this:
var sessionToken = CrossSecureStorage.Current.GetValue (“SessionToken”);
There are some more calls to delete a key and see if a key is present. Don't forget to install the NuGet package on both your shared code as well as your platform projects.
You can check on this link for how to use Xamarin.Auth in Xamarin.Forms.
One more option i would consider is using Akavache which can be used to store the data with same level of security & how to integrate it in Xamarin.Forms check on this link
I would like to try feature "integrate Sign In with LinkedIn".
I follow instructions and i download latest version ( Mobile SDK for Android 1.1.4) from:
https://developer.linkedin.com/downloads#androidsdk
Then i import and build project into Android Studio.
When i execute SDK for Android Sample App i obtain this screenshot:
http://i64.tinypic.com/35hpvyb.png
Any help will be appreciated. Greetings
I answer myself.
The problem was i didn´t follow (ignore) step "Associate your Android app with your LinkedIn app"
https://developer.linkedin.com/docs/android-sdk
1) Create an application
2) Signing Your Application, generating a debug key hash value.
3) Configure the values: In the Mobile->Android Settings->"Package Name & Package Hash" section of your LinkedIn application's configuration, add your application's package and hash values
That´s all. Sorry for such a dumb question... ;)
2 questions about using a QR code in an Android device:
1. Is it possible to launch a native Android application from a QR code? Maybe by some configured URI schema?
2. Another option which might be useful for me is to have a QR code scanner inside my own app. Will it be possible for me to somehow include a different app that scans QR codes inside my app? Or will I have to implement the scanning myself?
Thanks
To scan barcodes in Android by Intent, see https://github.com/zxing/zxing/wiki/Scanning-Via-Intent
To trigger an app from a QR code, yes, you need to register the app to handle the particular custom URL scheme. This is how the same app can respond to clicks on the web: https://github.com/zxing/zxing/wiki/Scanning-From-Web-Pages
Look at how it registers to handle URLs here: https://github.com/zxing/zxing/blob/master/android/AndroidManifest.xml
1.to use a configured schema you can check this post
Launch custom android application from android browser
Then the you could QR code this scheme just like market://
2. You could use Bar code scanner app and use below code to launch or you could even integrate the zxing library to scan yourself.
Intent intent = new Intent("com.google.zxing.client.android.SCAN");
intent.setPackage("com.google.zxing.client.android");
intent.putExtra("SCAN_MODE",
"ONE_D_MODE,QR_CODE_MODE,PRODUCT_MODE,DATA_MATRIX_MODE");
startActivityForResult(intent, 0);