Opening a url on browser from an activity on KeyGuard

382 views Asked by At

I have an activity that runs on the top of my secured lockscreen/ keyguard (The pattern key guard). The top view of the activity has the following flags:

getWindow().addFlags( WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD    |WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);

Then there is a button on the activity that should open google.com on the browser when the button is clicked and put in the right pattern on my key guard. However, when I click the button and put in the right pattern, google.com is not opened. The browser is opened, but it does not open google.com. What is interesting if change my keyguard to non-secure(swipe key guard instead of pattern), the browser opens to google.com. Anyone knows why? Here is the listener code when the button is clicked:

Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
startActivity(browserIntent);
finish();
0

There are 0 answers