Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
305 views
in Technique[技术] by (71.8m points)

android - Inject or load html file into TWA/Custom tabs

I'm currently working on a TWA / Custom tabs application. Seeing as the user needs to load a website, I want to implement an offline page incase the user isn't connected to the internet.

When using a webview, I can just load an html file, with custom tabs it seems to be more difficult.

What I'm currently doing: Once the app is launched, I do a check to see if the user is connected to the internet, if that fails I would like to display my offline page and give them the option to retry, otherwise start the custom tabs intent.

Is there an easy way to load/inject my offline html page into the custom tab, or is there another way to load the html file into view?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...