Android lock screen notification is not able to open Browser on double tapping

后端 未结 1 1351
忘掉有多难
忘掉有多难 2020-12-18 13:18

My app sends out a notification, which opens the Browser with the given url on tapping. Actually, the wrapped intent is sent to a BroadcastReceiver, and this broadcast recei

相关标签:
1条回答
  • 2020-12-18 13:54

    I think this is a bug in Chrome, and I have raised this issue to both Android and Chrome:

    https://code.google.com/p/android/issues/detail?id=221940&can=4&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened

    https://bugs.chromium.org/p/chromium/issues/detail?id=645848&can=4&q=&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified

    However, I found a workaround: Use custom tabs instead of normal tabs can solve this issue.

    intent.putExtra("android.support.customtabs.extra.SESSION", context.getPackageName());
    intent.putExtra("android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS", true);
    

    Add above Extras to force Chrome to use custom tabs.

    Find more here: https://developer.chrome.com/multidevice/android/customtabs

    0 讨论(0)
提交回复
热议问题