2

I have an activity named SubmitActivity. In the activity, I have a button. When I click the button, Chrome custom tabs open. To be able to back to application from custom tabs, I also used intent-filters with custom deep linking (host and scheme).

With intent-filters(deep linking) I'm starting a web view in the app. If I try to go back to SubmitActivity via pressing back button, before the SubmitActivity, I see a blank page. I could't solve this problem.

I also used

intent.setFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);

this code for closing the chrome tabs. So, I can be able to go back to SubmitActivity. But it's not helping about blank page.

sbb
  • 387
  • 1
  • 20

2 Answers2

2

I have a solution for you I was also having same problem like yours, but I found the solution

Add the below method in to to your on create method

Handler handler = new Handler();

handler.postDelayed(new Runnable() {
    public void run() {
        finish();
    }
}, 100);

I am 100 percent sure this method will work.

Priya
  • 1,416
  • 1
  • 14
  • 29
Agam Jain
  • 17
  • 4
0

I suspect that the webview goes back and expects some data (e.g url) that's what it is blank since it didn't receive anything.

This is a different case but it might help

Rima Ibrahim
  • 96
  • 1
  • 11