Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ class SourcepointCmpPlugin {
@JvmStatic
fun registerWith(registrar: Registrar) {
val activity = registrar.activity()
if (activity == null) {
// When a background flutter view tries to register the plugin, the registrar has no activity.
// We stop the registration process as this plugin is foreground only.
return;
}
val interstitialChannel =
MethodChannel(registrar.messenger(), "sourcepoint_cmp")
interstitialChannel.setMethodCallHandler(SourcepointCmp(registrar, interstitialChannel, activity))
Expand Down