Android Question What is the package name of my app (firebase)?

Rams007

Member
I'm trying to setup firebase. I have downloaded the google-services.json and put in in the *.b4a folder but I get error "Error parsing google-services.json" when I try to compile a default app.

I saved my project as firebase in the B4A IDE and in the firebase website I used com.B4A.firebase as my package name. I think this must be incorrect?
 

JohnC

Expert
Licensed User
Longtime User
Your app's package name is specified in the IDE: select Project...Build Configurations...Package
 
Upvote 0

Rams007

Member
Thanks. So it's b4a.example. That seems to work but now I have error,

Maven artifact not found: com.google.android.gms / play-services

Now I heave searched the forums and erel just says to follow instructions in this page, https://www.b4x.com/android/forum/threads/integrating-firebase-services.67692/#content which I have.

I have added to this #AdditionalJar: com.google.android.gms : play-services to #Region Project Attributes and added these
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)

to the manifest.

It seems I am missing google play services yet I have installed them in the SDK manager. What is going on?
 
Upvote 0

JohnC

Expert
Licensed User
Longtime User
One thing you should do right away is change the package name to something like "com.yourcompany.appname" (ie. com.rams007.myfbapp")

Then uninstall any previous versions so the new package name wont conflict.
 
Upvote 0

Rams007

Member
One thing you should do right away is change the package name to something like "com.yourcompany.appname" (ie. com.rams007.myfbapp")

Then uninstall any previous versions so the new package name wont conflict.

Thanks.

But it still seems that Google play services is not installed or there is some configuration problem. I have downloaded all packages in SDK manager that have Google play or services in their name.

What am I missing. Google play services doesn't show up in the library manager either. There is a library called GPS but I assume that's for satellite tracking services?
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
None of this is required. You don't need to open B4A Sdk Manager at all. Just follow the installation instructions.

 
Upvote 0

Rams007

Member
Ok I've got most of it to work I think, firebaseAds are still giving me errorrs though. I installed firebase components for the SDK manager that seems to be the problem, I then extracted the b4a_local and b4a_remote folders into the android SDK folder and it fixed most of the errors.

Now do I need all these firebase jars in the region section because if I do add them then it complains about missing dependencies again and I have to install them from the SDK manager which as I said creates a whole new set of errors?

#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.firebase/firebase-crash
#AdditionalJar: com.google.firebase/firebase-ads
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Upvote 0
Top