android - Open web link only in external browser -


i'd app opens urls. not all. android not allow exclude urls(( using android:pathpattern or android:pathprefix.

now opening urls use:

intent browserintent = new intent(intent.action_view, uri.parse(privacy_policy_url));         browserintent.addflags(intent.flag_activity_new_task);         getapplicationcontext().startactivity(browserintent); 

i want open web links in external browser. possible?

for opening url in external browser can use code

intent browserintent = new intent(intent.action_view, uri.parse("http://www.google.com")); startactivity(browserintent); 

and if want open link in application , can use webview , load url in follow

webview webview = (webview) findviewbyid(r.id.webview1); webview.getsettings().setjavascriptenabled(true); webview.loadurl("http://www.google.com"); 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -