Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AoD support #578

Merged
merged 4 commits into from
Dec 22, 2023
Merged
Show file tree
Hide file tree
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
@@ -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);
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

call onCreate asap when the app is launched

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