-
-
Save skydoves/68900be878c2521c2083bb077894fe22 to your computer and use it in GitHub Desktop.
firebase_messaging_services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class AppFirebaseMessagingService : LifecycleAwareFirebaseMessagingService() { | |
| override fun onNewToken(token: String) { | |
| super.onNewToken(token) | |
| lifecycleScope.launch { | |
| // send the token to the server | |
| .. | |
| } | |
| } | |
| override fun onMessageReceived(message: RemoteMessage) { | |
| super.onMessageReceived(message) | |
| Log.d(APP_LOG_TAG, "FCMService#onMessageRec onMessageReceived: ${message.data}") | |
| } | |
| override fun onDestroy() { | |
| super.onDestroy() | |
| Log.d(APP_LOG_TAG, "FCMService#onDestroy onDestroy") | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment