Firebase Cloud Messaging

Anyone managed to get this working on Android? I am able to receive notification on device when I tested it using the firebase console… but upon tapping on the notification, it does nothing (app did not launch).

I have it working on everything but Android 13. The only way launchargs will fire on 13 is if the app is active in the foreground. If the app is inactive or suspended, interacting with the notification does nothing. I think it has to do with this article.

Thank you for your reply. For Firebase, I do not require to do any initialisation for Android version right? Simply include the following code will be fine?

require( “plugin.notifications.v2” )

Once you have it setup correctly in the Firebase console, then follow this document. It is what I followed and it worked correctly for me. The “GoogleService-Info.plist” information is key.

Thanks for the information. I did exactly what the documentation said. When I sent a test message from Firebase console, the notification did appear on the phone. However, upon tapping on it, there was no response. The app supposed to get launched but it did not.

What version of Android are you testing on? I have the same issue with Android 13 and another user has reported the issue with Android 12. My testing on Android 7 works properly.

My test device is running Android 11. I wonder if something is required to declare at the manifest file. May I know which Solar2D version you are using? I am using 3682

I am on 3685. What is your notification listener returning?

1 Like

I finally managed to get it to work. The crash/failure to launch was caused by the inclusion of the OneSignal plugin in the build settings file though I am not using it.

Thank you so much for your help!