Open mohit1993 opened 3 years ago
I am not able to exit TWA's activity(WebView), i have a scenario where user needs to send feedback with phone shake gesture, i will listen sensor in native code with a service, i need to open a UI(Activity) for user where user can see feedback form , but i am not able to open new activity as TWA was already being launched and TWA's view is in foreground.
Trying to understand better the issue. Is this something that only happens when using the WebView fallback? Only when rendering using the browser, or both?
Hi folks,
I have almost the same use case.
I have a foreground service running in the native part of my app while the pwa is running in a CCT instance.
The Activity which have launched the CCT extends com.google.androidbrowserhelper.trusted.LauncherActivity
My need is to finish the CCT and exit the app, here is my code in my foreground service :
stopService(intent);
((Activity) LauncherActivity.currentContext).finishAffinity();
System.exit(0);
In the logcat I see the app being destroying, but the CCT is still open and the user can still interact with it
Can you help me please ? Thx
Same. The TWA launches in foreground.... but there's no way of closing the TWA. Clicking back button sends it background. I actually want the app to close.
This seems similar to crbug.com/925539. unfortunately there is no way to close the foreground CCT. I'll mark this as feature request.
Thanks !
Hello,
I am not able to exit TWA's activity(WebView), i have a scenario where user needs to send feedback with phone shake gesture, i will listen sensor in native code with a service, i need to open a UI(Activity) for user where user can see feedback form , but i am not able to open new activity as TWA was already being launched and TWA's view is in foreground.
I have a custom android activity which have code to launch TWA : basically i don't have TWA's Launcher activity as my launcher activity in AndroidManifest instead i copied code from TWA's Launcher Activity to my android launcher activity to launch TWA. Even if i finish my only activity which launches TWA, TWA is still in the foreground. I need help here whether i should be able to close TWA Web view, or i should be able to launch a new activity on top of TWA. I am not able to use my only activity(Launcher Activity) as it is also in
onPause
state due to TWA's view.