onCreateOrOnNewIntent
Deprecated
Use KMPNotifier.onCreateOrOnNewIntent(intent). See MIGRATION.md.
Replace with
import com.mmk.kmpnotifier.KMPNotifier
import com.mmk.kmpnotifier.extensions.onCreateOrOnNewIntent
Content copied to clipboard
KMPNotifier.onCreateOrOnNewIntent(intent)Content copied to clipboard
In order to receive notification data payload this functions needs to be called in Android side in launcher Activity #onCreate and #onNewIntent methods.
Example:
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
NotifierManager.onCreateOrOnNewIntent(intent)
setContent {
App()
}
}
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
NotifierManager.onCreateOrOnNewIntent(intent)
}
}Content copied to clipboard