Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to hide url in Chrome custom tab android

I have implemented new Chrome Custom Tab in android, I am using the following code to open

Uri uri = Uri.parse("https://akash.plobal.com/ploicy");
CustomTabsIntent.Builder intentBuilder = new CustomTabsIntent.Builder();                   
intentBuilder.setToolbarColor(Color.BLACK);
intentBuilder.setShowTitle(true);
intentBuilder.build().launchUrl(getActivity(), uri);

I need to hide url below the title in toolbar

enter image description here

like image 888
Akash Doshi Avatar asked Oct 18 '16 07:10

Akash Doshi


1 Answers

If you control both the content and the application, you can use Trusted Web Activities to completely remove the URL bar. You'll need to implement Digital Asset Links to validate the ownership of both.

If you don't own the content, it is not possible to hide the URL below the title. The URLs needs to visible to the user, so that they can know in which site they are. By removing this from the UI, a malicious site could mimic the UI of another one, and this could potentially create a security issue for users.

like image 183
andreban Avatar answered Nov 09 '22 18:11

andreban