Android Question Integrating Firebase Services 2

Croïd

Active Member
Licensed User
Longtime User
Hello,
I made the update with new snippets in manifest, I have this error message, but only with a nexus 4

Integrating Firebase Services : link

B4X:
Unable to instantiate receiver com.google.firebase.iid.FirebaseInstanceIdInternalReceiver: java.lang.ClassNotFoundException:
Didn't find class "com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" on path: DexPathList[[zip file "/data/app/com.xxx-1/base.apk"],nativeLibraryDirectories=[/data/app/com.xxx-1/lib/x86, /vendor/lib, /system/lib]]
android.app.ActivityThread.handleReceiver (ActivityThread.java:2709)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:616)

is this problem related only to nexus 4?
 

Croïd

Active Member
Licensed User
Longtime User
Ok Erel I'll add your code and I will wait crashly

B4X:
Sub CheckForGooglePlayServices As Boolean
    Dim GoogleApiAvailablity As JavaObject
    GoogleApiAvailablity = GoogleApiAvailablity.InitializeStatic("com.google.android.gms.common.GoogleApiAvailability").RunMethod("getInstance", Null)
    Dim context As JavaObject
    context.InitializeContext
    If GoogleApiAvailablity.RunMethod("isGooglePlayServicesAvailable", Array(context)) <> 0 Then
        GoogleApiAvailablity.RunMethod("makeGooglePlayServicesAvailable", Array(context))
        Return False
    End If
    Return True
End Sub
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Please, if i use new snippets and b4a +8 for firebase service !

B4X:
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)
CreateResourceFromFile(Macro, FirebaseAdMob.FirebaseAds)


I must delete all jar in activity ?


B4X:
#AdditionalJar: com.crashlytics.sdk.android:crashlytics
#AdditionalJar: com.google.firebase:firebase-core
#AdditionalJar: com.google.android.gms:play-services-base
#AdditionalJar: com.google.android.gms:play-services-ads

maybe is my problem !
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Thanks Erel, yesterday i have new error ! (apps is free)

I do not know if the customer has updated the services play but with the old version of the manifest I did not have this problem

B4X:
Fatal Exception: java.lang.RuntimeException
Unable to instantiate activity ComponentInfo{com.xxx/com.google.android.gms.ads.purchase.InAppPurchaseActivity}:
java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.ads.purchase.InAppPurchaseActivity"
on path: DexPathList[[zip file "/data/app/com.xxx-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.xxx-1, /vendor/lib, /system/lib]]
android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2137)
dalvik.system.NativeStart.main (NativeStart.java)

Caused by java.lang.ClassNotFoundException
Didn't find class "com.google.android.gms.ads.purchase.InAppPurchaseActivity"
on path: DexPathList[[zip file "/data/app/com.xxx-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.xxx-1, /vendor/lib, /system/lib]]
 
Upvote 0

Croïd

Active Member
Licensed User
Longtime User
Maybe it does not install Google Play Services despite the notification ! , I will wait

Thanks for all

Capture.PNG
 
Upvote 0
Top