Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

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

android - White screen when launch TWA with splash

I am showing a splash screen(TWA splash) when launching TWA, but I see a white screen for 4-5 seconds after the splash screen when launch the app after a delay, as my web code needs to load a lot more data before launch, I know my web code should not take too much time to load, but I want to handle this white screen with a loader on native end only due to some limitation. I have not extended LauncherActivity(from android browser helper SDK) neither used it as a launcher in Manifest, I had copied code(whatever required) from this activity to my native activity Abc due to some conditional launch. I am not able to figure out which activity is hosting web content now after the TWA launch. As my activity, Abc seems to be in an onPause state. so I can not use this activity to show loader. If I used a new activity to show a loader my web content does not load in the background, it starts loading only when web content is in the foreground. I want to show loader when there is time to load web content, is there any way to do it?

Note: I have few redirects in my web URLs for launch.


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

1 Answer

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...