Android Question FirebaseNotification no initialized

Darsiar

Member
FirebaseNotification does not want to initialize!
We just copied the FCM_Show example, then just changed the name and key as stated in the project.
Then they did everything that Yerel's advice required:
1. Registered the project in firebase
2. Changed the name of the application from FCM_Show to our chat.proba
3.uploaded the google-services.json file to the application root folder, next to the B4a file

The compiler does not give an error, and normally runs the program on the device.
An input line appears on the device.
But on line 23, the program crashes because on line 22
the fm object is not initialized, and then it is empty.
There is no indication of an error.
Just empty and all!
B4X:
Sub Service_Create
fm.Initialize("fm") '<--------------- not initialize !!!!
MyFCMToken=fm.Token ' <-------- ERROR: fm not initialize
Log (MyFCMToken)
Subscribe
ImHere.Initialize("ImHere",10000)
ImHere.Enabled=True
ChatsMap.Initialize

P.S.
google-services.json we placed (only for you) in the files folder. But in the Original, it is still present in the root folder.
 

Attachments

  • chat.proba.zip
    34.3 KB · Views: 173
Top