Hi All
I have an app that runs no problem on Android 5 or below and but when I tried on 6.0, the app started crashing (restarting on its own).
I narrowed the issue down to a code in my Firebase messaging Service (which gets started from the starter service)
The log doesn't show an error. Also the catch block is not executed.
Note that before calling the above code, I am calling the code below which works perfectly ok, showing that things are properly initialized
Any help is greatly appreciated
I have an app that runs no problem on Android 5 or below and but when I tried on 6.0, the app started crashing (restarting on its own).
I narrowed the issue down to a code in my Firebase messaging Service (which gets started from the starter service)
B4X:
Public Sub UNSubscribeFromTopics( lstTopics As List)
Dim i As Int
For i = 0 To lstTopics.Size - 1
Log("FCM: unsubscribe: " & lstTopics.Get(i) )
Try
'Remove this line and the app runs no problem
fm.UnsubscribeFromTopic(lstTopics.Get(i))
Catch
GeneralLib.GL_Log(LastException)
End Try
Next
End Sub
The log doesn't show an error. Also the catch block is not executed.
Note that before calling the above code, I am calling the code below which works perfectly ok, showing that things are properly initialized
B4X:
Public Sub SubscribeToTopics( lstTopics As List)
Dim i As Int
For i = 0 To lstTopics.Size - 1
fm.SubscribeToTopic(lstTopics.Get(i))
Next
fm.SubscribeToTopic("general")
Dim cTokenID As String = fm.Token
SaveToken( cTokenID )
End Sub
Any help is greatly appreciated
Last edited: