Integrating Firebase Analytics to Android Ultimate Plugin For Unity3d

Hi Guys, After we successfully integrate the Google play services and Google Mobile Ads to Android Ultimate Plugin today we will try to also Integrate the Firebase Analytics which came from this link

https://firebase.google.com/docs/analytics/unity/start

Setting Up Guides

https://firebase.google.com/docs/unity/setup

Before you start Integrating Firebase Analytics you need to provide 1st the SHA1 and SHA256 on firebase project settings to get this keys on your keystore follow this links

https://developers.google.com/android/guides/client-auth

 

For quick start guides on how to integrate firebase analytics and use inside Unity3d

https://github.com/firebase/quickstart-unity/blob/master/analytics/testapp/readme.md

To know on how to log events on firebase analytics follow and read this link

https://firebase.google.com/docs/analytics/unity/events

More information on Firebase Events

https://firebase.google.com/docs/reference/unity/class/firebase/analytics/firebase-analytics#eventaddpaymentinfo

More information on Parameters

https://firebase.google.com/docs/reference/unity/class/firebase/analytics/parameter

For setting user properties

https://firebase.google.com/docs/analytics/unity/properties

For Linking your google play or android app on Google play follow this link

https://support.google.com/firebase/answer/6392038?hl=en&ref_topic=6317497

https://firebase.google.com/support/guides/integrate-play-games

Note: if you have google play services plugin inside your Unity3d Project you will get some conflict on the google resolver jars , so what i do is i just remove the resolver from google play services plugin and after that a popup will appear on Unity3d Editor that asking you to install the dependencies and then just install and accept it after that you will see a lot of new libraries inside your Android Plugin folder and it will also replace your libraries with the new one which is not good because it might cause some problems or error on your other Android Plugin.

Here’s what happen, we successfully build the apk on Android Device

Things that still working

  1. Google Admob
  2.  Android Ultimate Plugin

Things that is not working

  1. Google play services the app crashed when try to login

How to fix the Android Errors?

Alright after searching  on different forums and support groups we find out from other people that the play services .aar files with 10.0.20 version have conflict on google play services to fix this change everything into version 10.0.1 both play services .aar files and firebase-analytics .aar files after that just build normally and everything should be fixed by now on our end everything is working fine after this changes and we also check the firebase dashboard and yes it detects that firebase analytics is running and active

Note: all of the .aar files must be the same version to make this build and run sucessfully

How to fix IOS xcode errors?

Yes it’s a bad news after we build the xcode project using unity3d we got lot’s of errors and yes it’s because of Firebase Analytics plugin for untiy3d and we spent lots of hours trying to find the solution on it and at last we got lucky so the solution is

  1. delete all the derived data on your machine because xcode get confused sometimes or most of the time when adding new framework or library this can be done by going to your Library/Developer/Xcode/DerivedData
  2.  force  build clean project the shortcut keys is cmd + shift + alt + k
  3. Delete all files inside pod directory
  4. open your terminal and then pod update
  5. build clean again once more and build the project on your device
  6.  if you still get error try to delete the frameworks and library that you add  and add it again this is weird but it works 🙂

more tips:

  1. when build ios or xcode project in unity3d always use build only dont use build and run and used Append not replace to avoid doing all the settings and fixes again that’s nightmare!!!
  2.  when opening the xcode project double click the work space not the xcode project file this will create a weird errors
  3.  always  build clean every time you open your xcode project and before building

and that’s the step we go through before we finally build it successfully on ios device.

 

And Here’s the list of other things you can do with Firebase

Firebase Cloud Messaging for Unity3d

https://firebase.google.com/docs/cloud-messaging/unity/client

Manage Users on Firebase for Unity3d

https://firebase.google.com/docs/auth/unity/manage-users

Firebase realtime Database for Unity3d

https://firebase.google.com/docs/database/unity/start
Firebase Storage for Unity3d

https://firebase.google.com/docs/storage/unity/start

Firebase Remote Config for Unity3d this is the best you can modify you game config and settings without actually uploading  a new build on google play store

https://firebase.google.com/docs/remote-config/use-config-unity

Firebase Invite for Unity3d

https://firebase.google.com/docs/invites/unity

And that is our findings, i hope this information helps you out and saves you a lot of time unlike us but yes we are happy to help you out 🙂

For more questions or comments or suggestions just email us at gigadrillgames@gmail.com

 

Integrating Firebase Google Admob on Android Ultimate Plugin for Unity3d

Hi Guys, After we Integrate Google Play Services with Android Ultimate Plugin For Untiy3d Successfully, we are now about to try the Firebase  Google Admob For Unity3d this is the newest way on adding Google Admob for your game after Google Acquired the Firebase technology they combine it quickly on their API like Admob and some other things like Analytics because Firebase is one of the unique Technology now a days that can be easily use by any one quickly  because it’s so simple and easy to use with a lot of features available.

to setup this on Unity3d this please follow and read these links below

Admob Setup for Unity3d

https://firebase.google.com/docs/admob/unity/start

Link for Google Mobile Ads Unity3d Plugin

https://github.com/googleads/googleads-mobile-unity/releases/tag/3.2.0

Plugin API for Untiy3d

https://firebase.google.com/docs/admob/unity/start#unity_plugin_api

Setup for Integrating Firebase Analytics for Unity3d

https://firebase.google.com/docs/unity/setup

Firebase Docs and Features

https://firebase.google.com/docs/

This post will be updated after we completed this integration and we will give you our findings on this integration like we did on google play services, so see you for now

 

Updates

We have successfully Integrate Google Admob Ads on Unity3d with Android Ultimate Plugin, Google play services and Google Mobile ads our findings

  1. you just need to change the min sdk to 9 and target sdk to 16 on Android Manifest of GoogleMobileAdsPlugin folder
  2.  change the target sdk on project.properties file to 16

and then you can build it successfully, here’s the demo apk with google admob banner ads running , install it and try to see it in action 🙂

link for demo APK

https://drive.google.com/file/d/0Bw14w3QBZaGxR0FFWFEwQXpDRGM/view?usp=sharing

this Finger VS Bugs game have Android Ultimate Plugin, Google Play Services and Google Mobile Ads which is Admob we used Banner Ads on this game try it out 🙂

Information about Admob Banner Sizes

https://firebase.google.com/docs/admob/android/banner

https://firebase.google.com/docs/admob/android/banner

Ad Request Targeting to customize your ads based on your target audience

https://firebase.google.com/docs/admob/android/targeting

and yes for testing admob on device this link might help you

http://answers.unity3d.com/questions/834119/admob-device-id-on-ios-for-test-ads.html

For getting device id  for testing admob ads

this code is if from that link in case it’s not active anymore 🙂

 

Thanks for  reading and visiting 🙂

for more question or comments or suggestions just email us at gigadrillgames@gmail.com