-
Notifications
You must be signed in to change notification settings - Fork 69
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
[Need Assist] Drop-in screen disappear after clicking the launch icon. #711
Comments
Hi, thanks for reaching out. Can you retry the same scenario but resume the app from the recent apps screen instead of the launcher icon? |
@jreij |
I think your activity is being recreated when the launcher icon is clicked. Can you log its lifecycle method calls? Like |
Yes, I have FYI, This issue is also can be reproduced on the official React Native Example https://github.com/Adyen/adyen-react-native. We are not using adyen-react-native since it is in BETA. |
Hmm ok in that case can you log your activity's lifecycle method calls? Should give us a hint on what's happening. |
Sure, package com.testpay;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import com.facebook.react.ReactActivity;
public class MainActivity extends ReactActivity {
@Override
protected String getMainComponentName() {
return "MyApp";
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Log.i("MainActivity", "onCreate()");
}
@Override
protected void onPause() {
super.onPause();
Log.i("MainActivity", "onPause()");
}
@Override
protected void onResume() {
super.onResume();
Log.i("MainActivity", "onResume()");
}
@Override
protected void onDestroy() {
super.onDestroy();
Log.i("MainActivity", "onDestroy()");
}
@Override
public void onNewIntent(Intent intent) {
super.onNewIntent(intent);
Log.i("MainActivity", "onNewIntent()");
}
} Logs for the flow described above:
|
Chiming in for a bit. This is the default behaviour of Translating that to your case: After starting drop-in your stack looks like this: Putting the app in the background and opening it with the launch icon will re-launch Now, I know this doesn't fix your problem, but I hope it helps you understand it better |
Thanks for the clarification. So, there is no way to fix this behaviour on ReactNative app, as RN requires As I understand, this behaviour can be avoided by using the Adyen Component instead of Drop-in. |
I'm not familiar with RN and a quick google didn't result in anything, so I don't know if this can be fixed. IMO RN should be able to work with other launch modes, but if you say it doesn't I believe you. Yes, you should be able to work around this by using Components. Note that it might be significantly more difficult based on which and how many components you need. |
@idutka - I am also having the same issue , were you able to fix the issue ? |
Closing this issue for inactivity, please reopen it if you feel like your questions are not yet answered. |
@jreij Guys, is that possible to run drop-in UI in NOT in the separate activity? We want to use Drop-In but in the same MainActivity. Or we should rewrite it by ourselves to achieve that? |
hi @Cattari, unfortunately Drop-in is only supported as a standalone activity that we launch on top of your app, if you'd like to have more control over it you'll need to use standalone Components and display the list of payment methods however you want. |
Describe the bug
The Drop-In screen disappears after clicking the launch button.
Drop-in 4.2.0 was successfully integrated into React Native application.
I can make a payment, but there is a case that needs to be fixed.
To Reproduce
Steps to reproduce the behavior:
DropIn.startPayment()
Expected behavior
The Drop-In screen is still present after clicking the launch button
Screenshots

Additional context
I've reviewed some examples of integration and still don't understand what is missing.
Here is integration module AdyenDropInModule.kt
Logs
The text was updated successfully, but these errors were encountered: