My app is running well but I want to open some page outside of app. How can I open a URL in a mobile browser?
If you want to open the link on the custom tab then follow: https://help.infixsoft.com/how-to-open-external-url-on-custom-tab/
If you want to apply this login for any web view action. Then the URL you want to overwrite just write condition under WebViewClient.
Here when my webview is trying to load google’s “http://www.google.com” URL then it’s open outside of the app. If you want more logic to apply just add one by one. Remember that in this case, you need to set a full URL.
if(url == "http://www.google.com"){ UtilMethods.browseUrlExternal(mContext, url) return true }
Tips: If you want to open every URL of google outside of the app then follow the below code.
if(url.contains("google.com")){ UtilMethods.browseUrlExternal(mContext, url) return true }
Tips: If you want without google URLs open outside of the then follow below code.
if(!url.contains("www.google.com")){ UtilMethods.browseUrlExternal(mContext, url) return true }
Tips: If you want to open outside od all URL which starts with a google domain.
if(url.startsWith("www.google.com")){ UtilMethods.browseUrlCustomTab(mContext, url) return true }
Hello… I want to have a list of URL for use inside the app and any other go outside the app… how i can do it?
I implement this code but doesn’t work:
if(!url.contains(“.domain1.com”)
|| !url.contains(“.domain2.com”)
|| !url.contains(“.domain3.com”)
){
UtilMethods.browseUrlExternal(mContext, url)
return true
}
// NOTE: Put a domain take all possibilities? .domain1.com also take http://www.domain1.com sub.domain1.com etc
Please edit my comment… this is the code (without dot in the domain)
if( !url.contains(“domain1.com”)
|| !url.contains(“domain2.com”)
|| !url.contains(“domain3.com”)
){
UtilMethods.browseUrlExternal(mContext, url)
return true
}
I mention here only put domain name then will support all of the domain links, include sublink. Example my URL: https://help.infixsoft.com/how-to-open-external-url-on-custom-tab/
Then you need to be added on condition: infixsoft.com
hi
I followed the steps, but nothing happened
I hope to explain the steps in the video on YouTube or here
Don’t worry from version 1.4 it will be dynamic.
Good thing,
But there is an important point, please pay attention to it
Payment gateways like Paypal and others,
Its important links open inside the app
For the payment process is not affected
Please contact me via email for customization.
Hi, how can I open all my amazon or ebay links in the native app of the phone instead of the browser?
For support please follow this: https://codecanyon.net/item/rocketweb-android-web-app-solution-webtoapp/22985174/faqs/41270