You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying very hard to add my app's custom dialog if a user presses the back button from CBActivity.
As per your document onBackButton(AlertDialog.Builder alertDialogBuilder) - This callback provides alert dialog access, so customisation can be done to alert dialog.
But In your CBActivityI can find that you are finishing activity if customBrowserConfig.setDisableBackButtonDialog(true) is set true. whic ofcourse finishes the activity and I am not able to add my custom dialog.
Please help.
It should work fine if you remove finish from your CBActivity.
//following code is from CBActivity(unEditable) @OverRide
public void onBackPressed() {
if (customBrowserConfig != null && customBrowserConfig.getDisableBackButtonDialog() != 1) {
payUCustomBrowser.addEventAnalytics(CBAnalyticsConstant.USER_INPUT, CBAnalyticsConstant.PAYU_BACK_BUTTON_CLICK.toLowerCase());
payUCustomBrowser.showBackButtonDialog();
} else {
payUCustomBrowser.addEventAnalytics(CBAnalyticsConstant.USER_INPUT, CBAnalyticsConstant.MERCHANT_BACK_BUTTON_CLICK);
if (CustomBrowserData.SINGLETON.getPayuCustomBrowserCallback() != null)
CustomBrowserData.SINGLETON.getPayuCustomBrowserCallback().onBackButton(null);
CBActivity.this.finish();
}
}
The text was updated successfully, but these errors were encountered:
I am trying very hard to add my app's custom dialog if a user presses the back button from CBActivity.
As per your document
onBackButton(AlertDialog.Builder alertDialogBuilder) - This callback provides alert dialog access, so customisation can be done to alert dialog.
But In your CBActivityI can find that you are finishing activity if customBrowserConfig.setDisableBackButtonDialog(true) is set true. whic ofcourse finishes the activity and I am not able to add my custom dialog.
Please help.
It should work fine if you remove finish from your CBActivity.
//following code is from CBActivity(unEditable)
@OverRide
public void onBackPressed() {
if (customBrowserConfig != null && customBrowserConfig.getDisableBackButtonDialog() != 1) {
payUCustomBrowser.addEventAnalytics(CBAnalyticsConstant.USER_INPUT, CBAnalyticsConstant.PAYU_BACK_BUTTON_CLICK.toLowerCase());
payUCustomBrowser.showBackButtonDialog();
} else {
payUCustomBrowser.addEventAnalytics(CBAnalyticsConstant.USER_INPUT, CBAnalyticsConstant.MERCHANT_BACK_BUTTON_CLICK);
if (CustomBrowserData.SINGLETON.getPayuCustomBrowserCallback() != null)
CustomBrowserData.SINGLETON.getPayuCustomBrowserCallback().onBackButton(null);
CBActivity.this.finish();
}
}
The text was updated successfully, but these errors were encountered: