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

AoD support #578

merged 4 commits into from
Dec 22, 2023

Conversation

nazli-stripe
Copy link
Collaborator

@nazli-stripe nazli-stripe commented Dec 1, 2023

Summary

Adds AoD support for RN SDK. Users will need to modify their MainApplication.java file to call onCreate, other options we tested didn't register the callbacks fast enough on S700.

Motivation

Feature parity!

Testing

  • I tested this manually
  • I added automated tests

Documentation

Select one:

  • I have added relevant documentation for my changes.
  • This PR does not result in any developer-facing changes.

Comment on lines 76 to 108
public void onActivityCreated(@NonNull final Activity activity, @Nullable final Bundle savedInstanceState) {
Log.d("onActivityCreated", activity.toString());
}

@Override
public void onActivityStarted(@NonNull final Activity activity) {
Log.d("onActivityStarted", activity.toString());
}

@Override
public void onActivityResumed(@NonNull final Activity activity) {
Log.d("onActivityResumed", activity.toString());
}

@Override
public void onActivityPaused(@NonNull final Activity activity) {
Log.d("onActivityPaused", activity.toString());
}

@Override
public void onActivityStopped(@NonNull final Activity activity) {
Log.d("onActivityStopped", activity.toString());
}

@Override
public void onActivitySaveInstanceState(@NonNull final Activity activity, @NonNull final Bundle outState) {
Log.d("onActivitySaveInstanceState", activity.toString());
}

@Override
public void onActivityDestroyed(@NonNull final Activity activity) {
Log.d("onActivityDestroyed", activity.toString());
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

log activities for debugging

@@ -54,11 +62,48 @@ public ReactNativeHost getReactNativeHost() {
@Override
public void onCreate() {
super.onCreate();
registerActivityLifecycleCallbacks(this);
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

@nazli-stripe nazli-stripe merged commit 827e1c2 into main Dec 22, 2023
2 checks passed
@nazli-stripe nazli-stripe deleted the nazli/aod branch September 6, 2024 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants