Android Question Io.fabric.sdk.android.Fabric -> SET Crashlytics log Alternative?

scsjc

Well-Known Member
Licensed User
Longtime User
In the old version of Crashlytics I used this code to leave clues (annotations) but with the current version it stopped working.
Is there a fix for the new firebase?


B4X:
Sub Class_Globals
    Private CL As JavaObject
End Sub

'Initializes the object. You can add parameters to this method if needed.
Public Sub Initialize (context As JavaObject)
#if Release

    Dim fabric As JavaObject
    CL.InitializeNewInstance("com.crashlytics.android.Crashlytics", Null)
    Dim kits As JavaObject
    kits.InitializeArray("io.fabric.sdk.android.Kit", Array(CL))
    fabric = fabric.InitializeNewInstance("io.fabric.sdk.android.Fabric.Builder", Array(context)) _
        .RunMethodJo("kits", Array(kits)) _
        .RunMethod("build", Null)

    Dim StaticFabric As JavaObject
    StaticFabric.InitializeStatic("io.fabric.sdk.android.Fabric").RunMethod("with", Array(fabric))
#end if
End Sub

Public Sub SetKey(Key As String, Value As String)
    CL.RunMethod("setString", Array(Key, Value))
End Sub
Public Sub CLog(msg As String)
#If Release
    CL.RunMethod("log", Array(msg))
#else
    Log(msg)
#End If
End Sub
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Duplicate post ?

 
Upvote 0

scsjc

Well-Known Member
Licensed User
Longtime User
i resolve with:
 
Upvote 0
Top