New Custom Chrome Tabs Link App And Web
Written by Mike James   
Thursday, 03 September 2015

The problem of integrating web use and app use for Android is a difficult one. Do you hand off to Chrome or use WebView. Now you can make the integration between Chrome and your app close enough not to need to spend time on WebView implemenation.

AndroidDevBlogBanner

 

The problem with passing a URL over to Chrome is that your user loses continuity and may not return to your app. This drives programmers to attempt to show the URL in WebView within their apps. This is the best way, but it can be costly in terms of implementation.

 

androidchrome

 

Now we have a third way, even if it is a modification of the Chrome way - Custom Chrome Tabs. You can hand over the URL to Chrome, but you can also control how the tab opened in the browser looks.

You can control: 

  • Toolbar color
  • Enter and exit animations
  • Add custom actions to the Chrome toolbar and overflow menu

You can also prestart Chrome and pre-fetch content to make the transition smoother. There are also connection callbacks to your app that are triggered by navigation events. 

The key feature for most apps is the ability to add custom action buttons and menu items to Chrome. A shared cookie jar and permissions model also means that you don't have to log into sites or ask for permissions they already have. Finally, and perhaps most important of all, users can return to your app with a single tap. 

The new feature will be in Chrome 45 and is currently in the beta channel and it will work with Jellybean onward. There is a complete example on GitHub and some documentation to help with getting it working.

According to the developer blog:

"Users will begin to experience custom tabs in the coming weeks in Feedly, The Guardian, Medium, Player.fm, Skyscanner, Stack Overflow, Tumblr, and Twitter, with more coming soon. "

So incorporate Custom tabs into your apps to add to this list.

 

AndroidDevBlogicon

Banner


Apollo Adds REST APIs For GraphQL
29/10/2024

Apollo has added a simpler way to integrate REST APIs into a federated GraphQL environment. Available now in public preview, can be used to map REST API endpoints to their GraphQL schema using a decla [ ... ]



JetBrains Makes WebStorm and Rider Free for Non-Commercial Use
24/10/2024

JetBrains has launched a non-commercial license for its JavaScript and TypeScript IDE, WebStorm, and for Rider, its cross-platform .NET and game development IDE.


More News

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

 

Last Updated ( Thursday, 03 September 2015 )