diff --git a/android/src/main/java/com/stripeterminalreactnative/TerminalApplicationDelegate.kt b/android/src/main/java/com/stripeterminalreactnative/TerminalApplicationDelegate.kt new file mode 100644 index 00000000..cbfbbb06 --- /dev/null +++ b/android/src/main/java/com/stripeterminalreactnative/TerminalApplicationDelegate.kt @@ -0,0 +1,13 @@ +package com.stripeterminalreactnative + +import android.app.Application +import com.facebook.react.bridge.UiThreadUtil +import com.stripe.stripeterminal.TerminalApplicationDelegate + +object TerminalApplicationDelegate { + + @JvmStatic + fun onCreate(application: Application) { + TerminalApplicationDelegate.onCreate(application) + } +} diff --git a/dev-app/android/app/src/main/java/com/dev/app/stripeterminalreactnative/MainApplication.java b/dev-app/android/app/src/main/java/com/dev/app/stripeterminalreactnative/MainApplication.java index 2f694c4d..773e654a 100644 --- a/dev-app/android/app/src/main/java/com/dev/app/stripeterminalreactnative/MainApplication.java +++ b/dev-app/android/app/src/main/java/com/dev/app/stripeterminalreactnative/MainApplication.java @@ -10,6 +10,7 @@ import com.facebook.soloader.SoLoader; import java.util.List; import com.stripeterminalreactnative.StripeTerminalReactNativePackage; +import com.stripeterminalreactnative.TerminalApplicationDelegate; public class MainApplication extends Application implements ReactApplication { @@ -54,6 +55,7 @@ public ReactNativeHost getReactNativeHost() { @Override public void onCreate() { super.onCreate(); + TerminalApplicationDelegate.onCreate(this); SoLoader.init(this, /* native exopackage */ false); if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) { // If you opted-in for the New Architecture, we load the native entry point for this app.