Tech tip of this week

Chrome Custom Tabs in Android

Chrome custom tabs give apps more control over their web experience.
CustomTabs is part of chromium platform.

Chrome Custom Tabs is now generally available to all users of Chrome, on all of Chrome's supported Android versions (Jellybean onwards).

Chrome Custom Tabs allow an app to customize how Chrome looks and feels. An app can change things like:
  • Toolbar color
  • Enter and exit animations
  • Add custom actions to the Chrome toolbar, overflow menu and bottom toolbar
Launching links in custom tabs more faster than chrome and webview.



Implementation:

First, add custom tab library in build.gradle file.


dependencies { 
        ... 
        compile 'com.android.support:customtabs:23.3.0' 
}

Then, start url with custom tabs

String url = ¨https://coderinsight.blogspot.com/¨; 
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(url));

after this you can customize tabs based on your needs.

More information will be available in below official Chrome page:
https://developer.chrome.com/multidevice/android/customtabs


3 comments:

  1. Nice information regarding Custom tabs in android My sincere thanks for sharing this post Please Continue to share this kind of post
    Android Training in Chennai

    ReplyDelete
  2. nice blog has been shared by you. before i read this blog i didn't have any knowledge about this but now i got some knowledge. so keep on sharing such kind of an interesting blogs.
    android training in chennai

    ReplyDelete
  3. Really cool post, highly informative and professionally written and I am glad to be a visitor of this perfect blog, thank you for this rare info!

    Android Online Training

    ReplyDelete