- Install Plugin.GoogleClient package into your Android project.
- Compatible Android device that runs Android 4.0+ and includes the Google Play Store or an emulator with an AVD that runs the Google APIs platform based on Android 4.2+ and has Google Play services 11.6+
- The latest version of the Android SDK, including the SDK Tools component. You can get the latest SDK from the Android SDK Manager in Visual Studio.
- Project configured to compile against Android 4.0(Ice Cream Sandwich) or newer.
- The Google Play services SDK:
-
Visual Studio 2017 Tools > Android > Android SDK Manager.
-
Scroll to the bottom of the package list and select Extras > Google Repository. The page is downloaded to your computer and installed in your SDK environment where the android SDK on you're Visual Studio is Installed.
-
Complete the Google Firebase Console Setup to include the required configuration file to your projects.
Add this permission.
<uses-permission android:name="android.permission.INTERNET"/>
- On the OnCreate method just after calling base.OnCreate:
GoogleClientManager.Initialize(this);
- Override the OnActivityResult method:
protected override void OnActivityResult(int requestCode, Result resultCode, Android.Content.Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
GoogleClientManager.OnAuthCompleted(requestCode, resultCode, data);
}
<= Back to Table of Contents