FCM Client Configuration
Libraries do not have an application identifier. The application identifier is provided by the consumer of your library. Just turn on the addiction and that. Do not use the google services plugin in the library.
https://firebase.google.com/docs/cloud-messaging/android/client. , push- , . :
your.client.app.package.fcm.MyFirebaseMessagingService.kt
class MyFirebaseMessagingService() : FirebaseMessagingService() {
override fun onMessageReceived(p0: RemoteMessage) {
super.onMessageReceived(p0)
AwesomeLibrary.processPushMessage(this, p0)
}
your.awesome.library.package.fcm.AwesomeLibraryFcm.kt
object AwesomeLibraryFcm {
fun processPushMessage(context: Context, message: RemoteMessage) {
}
}
, Firebase . Firebase .
FCM
FCM . Firebase, . .
- push- , ( IP- ) Google Dev . push-. , , , push mesages .
.