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:

tufanv

Expert
Licensed User
Longtime User
Do we need to register to fabric.io site because waited about 10 minutes and crash reports are not coming yet. maybe it takes time.

edit: ok nearly after 10 minutes , they started to come. Thanks !
 
Last edited:
D

Deleted member 103

Guest
The long GUID id should be changed whenever you make a new release. It uniquely identifies the build.
You can change one or more of the hex digits.
Is there an automatism or does it have to be changed manually?
 

DonManfred

Expert
Licensed User
Longtime User
D

Deleted member 103

Guest
you can write a b4j app which is called in a custombuildaction which then changes the B4A File (the Manifestpart) using regex for ex. to find the value and change it.
I know, but I prefer programming that in Visual Studio. ;)
 

SMOOTSARA

Active Member
Licensed User
Longtime User
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.


hi


If we use the

B4X:
    Try  
        Dim i As Int = "aaa"
    Catch
        Log(LastException.Message)
    End Try

Will this error be sent to Firebase again?

If the answer is no, how can we send this error to Firebase?

thankyou
 
Last edited:

asales

Expert
Licensed User
Longtime User
Will this error be sent to Firebase again?
I don't see the error in Firebase Console If I use the try..catch.
If the answer is no, how can we send this error to Firebase?
Use the events of Firebase Analitics (I don't know other way):
B4X:
    Catch
        Log(LastException.Message)
        Starter.analytics.SendEvent("FirebaseError", LastException.Message)
 

asales

Expert
Licensed User
Longtime User
Do we still need the Crashlytics class in the project?
No, If you use the new Firebase Crashlytics instructions:
 

SMOOTSARA

Active Member
Licensed User
Longtime User
No, If you use the new Firebase Crashlytics instructions:


Hello
Thank you for your guidance

Do we need to add a " Firebase Crashlytics " library
and
 

fishwolf

Well-Known Member
Licensed User
Longtime User
I have enable crash analitics on firebase console, but don't exit from this status (waiting)

1601122204320.png
 
Last edited:
Status
Not open for further replies.
Top