Hello!
After long manipulations with the FCM_Show example, on the advice of Eral, we still managed to get the FirebaseMessaging object to be initialized correctly.
But now a strange error occurs when trying to send a control message from the Firenase console to the device.
The token that FirebaseMessaging generates is too long (over 120 characters), although no more than 50 characters are required.
To study the situation, so as not to annoy Erel with stupid questions, we created a control application for the Kotlin language in Android Studio. We connected it to the same project that we use in BASIC 4 Android.
There, when initialized with the same json file, a token of the correct length is generated.
We really don’t understand where to dig further?
What are the suggestions?
Dear Erel! Your Baysik is really wonderful, and it is suitable for schoolchildren and students. But its documentation is clearly not sufficient. Let's improve documentation together, no offense.
For example: where is it written about the length of the token?
TOKIN:
dsGZObTUaGk:APA91bEgeKawJk5qK-hEgiOGWRVnRjFvWvJVafoVG--s3kSVdwxbxr8yydmQ2U2HA2nPLcb79caGBNu7f9xXzcT-CcuSZJVgvgvTxPbk4q11KVF7GCKtSpCY7V8gxzaaes9OxbdxavNJ
The event is not triggering at all!
Where to dig?
After long manipulations with the FCM_Show example, on the advice of Eral, we still managed to get the FirebaseMessaging object to be initialized correctly.
But now a strange error occurs when trying to send a control message from the Firenase console to the device.
The token that FirebaseMessaging generates is too long (over 120 characters), although no more than 50 characters are required.
To study the situation, so as not to annoy Erel with stupid questions, we created a control application for the Kotlin language in Android Studio. We connected it to the same project that we use in BASIC 4 Android.
There, when initialized with the same json file, a token of the correct length is generated.
We really don’t understand where to dig further?
What are the suggestions?
Dear Erel! Your Baysik is really wonderful, and it is suitable for schoolchildren and students. But its documentation is clearly not sufficient. Let's improve documentation together, no offense.
For example: where is it written about the length of the token?
B4X:
Sub Service_Create
'This is the program entry point.
'This is a good place to load resources that are not specific to a single activity.
fm.Initialize("fm")
MyFCMToken=fm.Token ' <------- long > 50 ??? !!!
Log (MyFCMToken)
TOKIN:
dsGZObTUaGk:APA91bEgeKawJk5qK-hEgiOGWRVnRjFvWvJVafoVG--s3kSVdwxbxr8yydmQ2U2HA2nPLcb79caGBNu7f9xXzcT-CcuSZJVgvgvTxPbk4q11KVF7GCKtSpCY7V8gxzaaes9OxbdxavNJ
The event is not triggering at all!
B4X:
Sub fm_TokenRefresh
MyFCMToken=fm.Token
Log (MyFCMToken)
End Sub
Attachments
Last edited: