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?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…