Android Question B4A 7.8 beta - Firebase Firestore dependencies - Part 2

DonManfred

Expert
Licensed User
Longtime User
Firestore getProductID cannot be null error

Based on https://stackoverflow.com/questions/46564349/firestore-getproductid-cannot-be-null-error
the solution seems to be to use a newer google services

B4X:
I had the same problem. Solved with this in gradle : 3.0.0 to 3.1.0

buildscript {
    dependencies {
        classpath 'com.google.gms:google-services:3.1.0'
    }
}

i tried to add
B4X:
#AdditionalJar: com.google.gms:google-services

but this results in
B4A Version: 7.80 BETA #1
Parse den Code. (0.00s)
Kompiliere den Code. (0.02s)
Kompiliere Layoutcode. (0.00s)
Organisiere Libraries. Error
Maven artifact nicht gefunden: com.google.gms/google-services
 

DonManfred

Expert
Licensed User
Longtime User
This is not a jar that should be included in the app. It is an Android Studio tool
ohh ok.

The Firebase Firestore Testproject (FireEats) does work fine compiled with AS.

Ok, i try to compile again and check the Resources.
I´ll keep you informed.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
B4X:
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="default_web_client_id" translatable="false">888XXXXXXXXXX-xXXXXXXXXXXXXXXXXXXXXXXXXX.apps.googleusercontent.com</string>
    <string name="firebase_database_url" translatable="false">https://xxxxxb4a.firebaseio.com</string>
    <string name="gcm_defaultSenderId" translatable="false">888xxxxxxx</string>
    <string name="google_api_key" translatable="false">AIzaxxxxxxxxxxxxxxxxx</string>
    <string name="google_app_id" translatable="false">1:88893xxxxxxxx:android:cxxxxxxxba16</string>
    <string name="google_crash_reporting_api_key" translatable="false">AIzaxxxxxxxxxxxxxxxxxFF0A</string>
    <string name="google_storage_bucket" translatable="false">xxxxx4a.appspot.com</string>
    <string name="project_id" translatable="false">xxxxxb4a</string>
</resources>

This is the resource which is Firestore using to get the Applicationid.

The relevant one seems to be this
B4X:
<string name="google_app_id" translatable="false">1:88893xxxxxxxx:android:cxxxxxxxba16</string>

But, depending on what feature we use, others may be relevant too.
Storage-Bucket for ex. which is only relevant when using Firebase Storage
Or gcm_defaultSenderId which is for sending Pushnotifications
 
Upvote 0
Top