Skip to content

Commit

Permalink
AoD support (#578)
Browse files Browse the repository at this point in the history
* move onCreate call to MainApplication

* remove runOnUiThread.

* clean up

* revert RNModule.kt changes

---------

Co-authored-by: Ian Lin <[email protected]>
  • Loading branch information
nazli-stripe and ianlin-bbpos authored Dec 22, 2023
1 parent 2521c38 commit 827e1c2
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 827e1c2

Please sign in to comment.