Firebase Analytics and Ads in different build flavors.

819 views
Skip to first unread message

feasy.app...@gmail.com

unread,
May 25, 2016, 10:22:00 AM5/25/16
to Firebase Google Group
Hello, I will try to be short. I have developed an Android app that has to flavors (free and pro). I want to implement firebase to get ads from admob and for analytics. In the firebase console where I add a new app I need to give a package name for the app. What name should I give? 

for example:
com.company.game  - which is the general package name of the app or
com.company.game.free - which is the package name for the free build which has ads (but if I add this it will not get analytics for the pro build?)
or should I create 2 app in firebase console.

Thank you 

Kato Richardson

unread,
Jun 2, 2016, 8:18:25 PM6/2/16
to Firebase Google Group
I believe the correct answer here is to create both android apps (one for game and one for game.free) in the same project. You can add multiple android apps to the same project, which should suit your needs here.

Also, you may want to check out Remote Config. I'm by no means well versed in this tool yet, but assuming the apps are fairly similar, with a few features enabled/disabled based on free/paid, this seems like it might be a great fit for you.

☼, Kato

--
You received this message because you are subscribed to the Google Groups "Firebase Google Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to firebase-tal...@googlegroups.com.
To post to this group, send email to fireba...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/firebase-talk/9f02d061-61dd-4a15-9d92-c1ba7de7a683%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Kato Richardson | Developer Programs Eng | kato...@google.com | 775-235-8398

Doug Stevenson

unread,
Jun 3, 2016, 6:24:42 PM6/3/16
to Firebase Google Group
Yes, I think the best thing would be to give different package names to your flavor exactly as you show in your example, and also create two different apps for those packages under the same project.  When you do this, they will have separate analytics which you can track independently from each other in the console.

If you're trying to make a decision at runtime about whether or not to place an ad, you can use Android's generated BuildConfig file to check the name of flavor and only place the ad if it's the free version.

Doug
Reply all
Reply to author
Forward
0 new messages