B4A Library Crashlytics - crash reports

Status
Not open for further replies.
Google has deprecated the old method. The instructions were updated. Note that the old class is no longer required.

  1. Make sure to use B4A v10.2+ with the recommended SDK: https://www.b4x.com/b4a.html
  2. Follow firebase integration tutorial: Integrating Firebase Services
  3. Add a reference to OkHttpUtils2.
  4. Add to Main:
    B4X:
    #AdditionalJar: com.google.firebase:firebase-crashlytics

  5. Make sure that #VersionName attribute is not empty. It will not work with an empty value.
  6. Add to manifest editor:
    B4X:
    CreateResourceFromFile(Macro, FirebaseAnalytics.GooglePlayBase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Firebase)
    CreateResourceFromFile(Macro, FirebaseAnalytics.Crashlytics)
  7. Make sure that Crashlytics is enabled in Firebase console and crash the app in release mode. You can use this code:
    B4X:
    Dim i As Int = "aaa"
The crash should appear in Firbease console under Quality - Crashlytics after a few minutes.
 
Last edited:
Status
Not open for further replies.
Top