简体   繁体   中英

Android load html data into chrome custom tabs

I want to use chrome custom tabs in my app. I found how to load data from url into tabs, but i didnt find, how to load data from string value with html-tags. How to make analogous functional from webview-example:

webViewContent.loadDataWithBaseURL(null, htmlText, "text/html", "UTF-8", null);

in chrome custom tabs?

Its not directly possible to load a HTML string or local HTML file having file:// url to chrome custom tabs.

But you can implement Local Server to render offline html content in Custom chrome tabs. refer following URL.

https://bitbucket.org/snippets/pkumarad/qAk6x

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM