Permalink
Browse files

Instance Firebase Analytics in Android app.

  • Loading branch information...
ilanolkies committed May 31, 2018
1 parent 161b9a3 commit 5dd09c2596a1028efe1a092168505492dc48b325
@@ -67,6 +67,7 @@
</ItemGroup>
<ItemGroup>
<None Include="Properties\AndroidManifest.xml" />
<None Include="google-services.json" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\layout\Tabbar.axml" />
@@ -94,6 +95,9 @@
<Folder Include="Resources\drawable-xxhdpi\" />
<Folder Include="Resources\drawable-xxxhdpi\" />
<Folder Include="Assets\" />
</ItemGroup>
<ItemGroup>
<GoogleServicesJson Include="google-services.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\GAExample\GAExample.csproj">
@@ -1,21 +1,21 @@
using System;

using Android.App;
using Android.App;
using Android.Content.PM;
using Android.Runtime;
using Android.Views;
using Android.Widget;
using Android.OS;
using Firebase.Analytics;

namespace GAExample.Droid
{
[Activity(Label = "GAExample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
FirebaseAnalytics firebaseAnalytics;

protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;

firebaseAnalytics = FirebaseAnalytics.GetInstance(this);

base.OnCreate(bundle);

@@ -24,4 +24,3 @@ protected override void OnCreate(Bundle bundle)
}
}
}

@@ -0,0 +1,46 @@
{
"project_info": {
"project_number": "508995298724",
"firebase_url": "https://xamarin-example-19586.firebaseio.com",
"project_id": "xamarin-example-19586",
"storage_bucket": "xamarin-example-19586.appspot.com"
},
"client": [
{
"client_info": {
"mobilesdk_app_id": "1:508995298724:android:8f0beab4bafb48a0",
"android_client_info": {
"package_name": "com.ilanolkies.GAExample"
}
},
"oauth_client": [
{
"client_id": "508995298724-5hcrm6k754ev25lp8lgv8ts7qpuh767h.apps.googleusercontent.com",
"client_type": 3
},
{
"client_id": "508995298724-5hcrm6k754ev25lp8lgv8ts7qpuh767h.apps.googleusercontent.com",
"client_type": 3
}
],
"api_key": [
{
"current_key": "AIzaSyCnC7Ue_4QRUqgO9BMqG-Cn8bNZDJCnMEc"
}
],
"services": {
"analytics_service": {
"status": 1
},
"appinvite_service": {
"status": 1,
"other_platform_oauth_client": []
},
"ads_service": {
"status": 2
}
}
}
],
"configuration_version": "1"
}

0 comments on commit 5dd09c2

Please sign in to comment.