getIntent

fun getIntent(context: Context, nodeId: String, @DrawableRes image: Int, topMessage: String, bottomMessage: String, positiveButtonLabel: String? = null, negativeButtonLabel: String? = null): Intent

Returns the Intent to display a re-engage prompt to the user.

This can be used in Compose with rememberLauncherForActivityResult and ActivityResultLauncher.launch:

val launcher = rememberLauncherForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
// user pushed the positive button!
}
}

launcher.launch(reEngagePrompt.getIntent(/*params*/))

It can also be used directly in an ComponentActivity with ComponentActivity.registerForActivityResult:

 val launcher = registerForActivityResult(
ActivityResultContracts.StartActivityForResult()
) { result ->
if (result.resultCode == RESULT_OK) {
// user pushed the positive button!
}
}

launcher.launch(reEngagePrompt.getIntent(/*params*/))