Android Google Chrome not firing after lockscreen app

随声附和 提交于 2019-12-01 03:13:56

I would open the web page as follows:

public void OpenUrl() {         

    private WebView View;
    View = (WebView) WebDialog.findViewById(R.id.ticketline);  
    View.setWebViewClient(new WebConn());
    View.setScrollbarFadingEnabled(true);  
    View.setHorizontalScrollBarEnabled(false);  
    View.getSettings().setJavaScriptEnabled(true);
    View.loadUrl("url to be loaded goes here");

    getActivity().getSupportFragmentManager().beginTransaction().remove(this).commit();
    WebDialog.show();
}

Alternatively you could try the following:

getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD|WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED); 
Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("url goes here")); 
startActivity(browserIntent);
finish();

Hope this helps :)

Luxi Liu

I have got the same problem, I believe this is a bug in Chrome as other browsers, like Firefox and Opera, they work properly. But I found a workaround

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

Let me know whether this works for you or not.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!