7

I am trying to load a web url by using Custom Tabs.

I am using following version of custom tabs

  implementation 'com.android.support:customtabs:27.1.1'

The issue is that it keeps opening chrome web browser instead of custom tabs type layout descibed in the below picture.

Custom Tabs Example

This is my code.

    public void createCustomTab(String url){


        // CustomTabsIntent.Builder used to configure CustomTabsIntent.
                CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();

        // CustomTabsIntent used to launch the URL
                CustomTabsIntent customTabsIntent = builder.build();

        // Open the Custom Tab
                customTabsIntent.launchUrl(eContext, Uri.parse(url));

}

I am trying this on a Lollipop device, and my current target SDK is 27

dev90
  • 7,187
  • 15
  • 80
  • 153

0 Answers0