Android Question Google Maps problem

cwt

Active Member
Licensed User
Longtime User
I have not used B4A for almost 5 years but have now renewed my license and am dusting off my skills and the apps I wrote years ago. Using B4A v6.31.

https://www.b4x.com/android/forum/threads/google-maps.63930

I have followed the instructions for the above tutorial to a tee and have Google Maps working fine in my app but at first I had a problem with the Firebase code that I added to the manifest as this tutorial instructed. With the Firebase base block of code added to the manifest the app compiled with no errors but the app crashed on the device as soon as the USB driver added the newly compiled app and tried to start it.

If I comment out the Firebase code in the manifest then my app works perfectly with Google Maps.

First, why do I need the Firebase code in my manifest at all and what in that code might be causing the app crash? I noticed from the posts in the Google Maps tutorial that another user had the same exact problem with the Firebase code.
 

DonManfred

Expert
Licensed User
Longtime User
You should use usb debugging and connect your device with usb and run it till it crashes.
You should post the complete error you got (as text)
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
You should use usb debugging and connect your device with usb and run it till it crashes.
You should post the complete error you got (as text)

As you can see from the text of my post, if you had read it, I am using USB debugging.

And there is no error message posted back to the logs in B4A - the app simply crashes immediately when it starts. The device shows "Unfortunately, your appname has quit running".
 
Upvote 0

cwt

Active Member
Licensed User
Longtime User
Uncheck the Filter option in the logs tab. There should be an error message in the logs.
You don't need to add any Firebase related code to your project.

I unchecked "Filter" but the log streams by so fast and in such volume that I could not see any error message.

The specific Firebase block of code from the manifest that causes the crash is below:

<service
android:name="com.google.android.gms.measurement.AppMeasurementService"
android:enabled="true"
android:exported="false"/>
<provider
android:authorities="${applicationId}.firebaseinitprovider"
android:name="com.google.firebase.provider.FirebaseInitProvider"
android:exported="false"
android:initOrder="100" />
<receiver
android:name="com.google.android.gms.measurement.AppMeasurementReceiver"
android:enabled="true">
<intent-filter>
<action android:name="com.google.android.gms.measurement.UPLOAD"/>
</intent-filter>
</receiver>

If I remove the above code and leave the rest of the Firebase code in the manifest then it works fine.
 
Upvote 0
Top