Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.56 KB

AndroidSetup.md

File metadata and controls

38 lines (29 loc) · 1.56 KB

Android Setup

  • Install Plugin.GoogleClient package into your Android project.

Prerequisites

  • 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:
  1. Visual Studio 2017 Tools > Android > Android SDK Manager.

  2. 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.

  3. Complete the Google Firebase Console Setup to include the required configuration file to your projects.

AndroidManifest.xml

Add this permission.

    <uses-permission android:name="android.permission.INTERNET"/>

MainActivity.cs

  • 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