This post explain how to integrate new Crashlytics into our app.
The question is how to implement the library but so that it does not send data to the google server before we get the user's consent?
The issue is related to the GDPR law, which requires that the consent of the user be required before sending the data.
The law also strictly prohibits the sending of any data if the user is a child.
Public Sub CLLog(msg As String)
GetCrashlytics.RunMethod("log", Array(msg))
Log(msg)
End Sub
Private Sub GetCrashlytics As JavaObject
Dim jo As JavaObject
jo = jo.InitializeStatic("com.google.firebase.crashlytics.FirebaseCrashlytics").RunMethod("getInstance", Null)
Return jo
End Sub
Public Sub CLLog(msg As String)
GetCrashlytics.RunMethod("log", Array(msg))
Log(msg)
End Sub
Private Sub GetCrashlytics As JavaObject
Dim jo As JavaObject
jo = jo.InitializeStatic("com.google.firebase.crashlytics.FirebaseCrashlytics").RunMethod("getInstance", Null)
Return jo
End Sub
Enable opt-in reporting
By default, Crashlytics automatically collects crash reports for all your app's users. To give users more control over the data they send, you can enable opt-in reporting for your users by disabling automatic collection and initializing Crashlytics only for selected users:
Turn off automatic collection by adding a new key to your Info.plist file:
Key: FirebaseCrashlyticsCollectionEnabled
Value: false
Enable collection for select users by calling the Crashlytics data collection override at runtime. The override value persists across launches of your app so Crashlytics can automatically collect reports. To opt out of automatic crash reporting, pass false as the override value. When set to false, the new value does not apply until the next run of the app. SwiftObjective-C
[[FIRCrashlytics crashlytics] setCrashlyticsCollectionEnabled:YES];
This is a wrapper of Firebase Crashlytics library for B4i. I made this for @Jack Cole and he gave me permission to post this in forum to help other users. iFirebaseCrashlytics Author: @Biswajit Version: 2 Crashlytics Events: HasUnsentReports Functions: checkForUnsentReports Check for...
www.b4x.com
Wrapper: @Biswajit Version: 1.01
Crashlytics
Functions:
Initialize (EventName As String) Initializes the library inside the Application_Start function.
You should initialize FirebaseAnalytics before initializing this library.
TestCrash Call this for testing library integration. After a test crash open you app again to send the data to firebase. Then check firebase console.
This is a wrapper of Firebase Crashlytics library for B4i. I made this for @Jack Cole and he gave me permission to post this in forum to help other users. iFirebaseCrashlytics Author: @Biswajit Version: 2 Crashlytics Events: HasUnsentReports Functions: checkForUnsentReports Check for...
Public Sub CLLog(msg As String)
GetCrashlytics.RunMethod("CLS_LOG:", Array(msg))
Log(msg)
End Sub
Private Sub GetCrashlytics As NativeObject
Dim no As NativeObject
no = no.Initialize("Crashlytics").RunMethod("sharedInstance", Null)
Return no
End Sub