Android Question Trying to set up Crashlytics

cooperlegend

Active Member
Licensed User
Longtime User
So I tried very hard to follow all the steps, but I can't seem to get past this point, the link to the docs just links back to here and I keep going around in circles .

Help please :)

1582298260605.png
 

cooperlegend

Active Member
Licensed User
Longtime User
Yes, completed all the steps in the tutorial, the App already works with Firebase messaging

So I clicked the link

it now shows the following, but then does nothing and when I return to the overview, Firebase says to continue installing the SDK and goes back to the previous screen.

Tutorials are great if you know what you are doing, but so far this one just doesn't work for me... :(

1582299165127.png
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
the App already works with Firebase messaging
CrashLytics add additional steps into the integration.

1. Make sure to download the json new and replace the google-services.json with the new one.
2. Post you manifestcode
3. Post the top of you main activity.. the lines with additionaljar...
 
Upvote 0

cooperlegend

Active Member
Licensed User
Longtime User
Thank You

I have downloaded the latest json file

Manifest
B4X:
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: https://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28"/>
<supports-screens
    android:xlargeScreens="true"
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:anyDensity="true"/>)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

'************ Google Play Services Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)

'************ Firebase Base ************
CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)

'************ Firebase Notifications ************
CreateResourceFromFile(Macro, FirebaseNotifications.FirebaseNotifications)

'************ Firebase Analytics ************
CreateResourceFromFile(Macro, FirebaseAnalytics.FirebaseAnalytics)

AddReceiverText(eu.dgconsulting.appupdating.newinst2,
  <intent-filter>
  <action android:name="android.intent.action.PACKAGE_REPLACED" />
    <data android:scheme="package" />
  </intent-filter>)

' Starting from Android 7 (API 24) we pass a file uri using a FileProvider
AddApplicationText(
  <provider
  android:name="android.support.v4.content.FileProvider"
  android:authorities="$PACKAGE$.provider"
  android:exported="false"
  android:grantUriPermissions="true">
  <meta-data
  android:name="android.support.FILE_PROVIDER_PATHS"
  android:resource="@xml/provider_paths"/>
  </provider>
)
CreateResource(xml, provider_paths,
   <files-path name="name" path="shared" />
)

AddPermission(android.permission.REQUEST_INSTALL_PACKAGES)

AddPermission(android.permission.INTERNET)

' TV Settings
AddManifestText(<uses-feature android:name="android.software.leanback"
                              android:required="false" />       
                <uses-feature android:name="android.hardware.touchscreen"
                              android:required="false" />)

SetApplicationAttribute(android:banner, "@drawable/banner")       

AddActivityText(TvActivity,
                <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
                </intent-filter>)
        
AddApplicationText(
 <provider
            android:name="com.crashlytics.android.CrashlyticsInitProvider"
            android:authorities="$PACKAGE$.crashlyticsinitprovider"
            android:exported="false"
            android:initOrder="100" />
           )
        
CreateResource(values, com_crashlytics_build_id.xml,
<resources xmlns:tools="http://schemas.android.com/tools">
<string tools:ignore="UnusedResources,,TypographyDashes" name="com.crashlytics.android.build_id"
   translatable="false">aa778fddb7024f38a1b4491ef214b8f7</string>
</resources>)

Added to Main in Project Attributes.
#AdditionalJar: com.crashlytics.sdk.android:crashlytics
#AdditionalJar: com.google.firebase:firebase-core
 
Upvote 0

cooperlegend

Active Member
Licensed User
Longtime User
Sorry, sussed it , I hadn't copied the json file to correct folder to get compiled into the new code :)

Thanks for you help
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Sorry, sussed it
what does this mean? I tried google translate but it translated sussed to "sussed" in German which i do not know in german dictionary
I hadn't copied the json file to correct folder to get compiled into the new code
So you now have copied to the correct place and it is working now?
 
Upvote 0

cooperlegend

Active Member
Licensed User
Longtime User
"sussed it" is an English term meaning that I have figured out what the problem was :)

Yes, working now, just waiting for my test crash report to come through.

Thank you
 
Upvote 0
Top