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
Post a Comment