I buy RocketWeb from codecanyon and now I want to open some URL on CustomTab
If you want to open URL outside of app then follow this: https://help.infixsoft.com/how-to-open-a-link-outside-the-app/
If you want to open URL in CustomTab then you need to override the URL. Make sure that the URL you send an exact match. In my case, I open http://www.infixsoft.com so add this line of code. Add the same code on both blocks.
if(url == "http://www.infixsoft.com"){
UtilMethods.browseUrlCustomTab(mContext, url)
return true
}
Tips: If you want to open all the URL of a domain then use:
if(url.startsWith("http://www.infixsoft.com")){ UtilMethods.browseUrlCustomTab(mContext, url) return true }
Tips: If you want to open all the URL who has any specific text then use:
if(url.contains("infixsoft")){
UtilMethods.browseUrlCustomTab(mContext, url)
return true
}
Tips: If you want to open all the URL without your domain:
if(!url.contains("infixsoft")){
UtilMethods.browseUrlCustomTab(mContext, url)
return true
}