-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.
Description
I implemented android native module from Bambora SDK and displayed its native view(activity) by getCurrentActivity().startActivity(intent);
It works like a charm but finish()
makes whole app quit instead of going back. Here are some of my codes.
public class ToastModule extends ReactContextBaseJavaModule {
@ReactMethod
// Calling module function from ReactJS code and works well
public void goToRegisterCardView(Callback callback) {
Intent intent = new Intent(getCurrentActivity(), NativeCardRegistrationActivity.class);
getCurrentActivity().startActivity(intent); //start Activity successfully
}
...
}
public class NativeCardRegistrationActivity extends AppCompatActivity implements ICardRegistrationCallback {
@Override
public void onRegistrationSuccess(CreditCard creditCard) {
finish();// Exit whole app instead of going back.
}
...
}
So I'm sure it's not a reason from Bambora SDK and finish()
kills NativeCardRegistrationActivity
. The whole app is killed because there is no activity in Activity Stack
.
Because I'm not familiar with Java code, I'm not able to figure out what the reason is here.
Please let me know what's wrong and how I can go back to original react-native activity.
Metadata
Metadata
Assignees
Labels
Resolution: LockedThis issue was locked by the bot.This issue was locked by the bot.