open url in native browser android
Hi support,
I have an app that open my website when launched.
Now I would like open all external links with native browser in android devices.
In iphone/ipad i have solved by opening projcet in xcode and editing file MainViewController.m by adding following code:
(every image and every site without prefix http://www.icoinprice.com/app)
#pragma mark - UIWebViewDelegate
(BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType {
// Open jpg files, OR External Links (not beginning with http://www.icoinprice.com/app) in Safari.app
if (
(navigationType == UIWebViewNavigationTypeLinkClicked) &&
([[[request URL] absoluteString] hasSuffix:@"jpg"]
||
![[[request URL] absoluteString] hasPrefix:@"http://www.icoinprice.com/app"])
) {Code: Select all
[[UIApplication sharedApplication] openURL:request.URL]; return NO;
}
Code: Select all
return YES; }
Could you help me to do the same thing with android devices ?