-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restart on split-screen #744
Comments
Can you provide some more information? |
I mean standard android split-screen. Like described in this article:
It's simple app, which after "device ready ", start a new "log in" activity (with MsAdal plugin), where user can login to ADFS. If user go back to main activity, it get info about result, and if it is suceess it navigates user to other page.
User, after getting logging page, turn on split screen. This restarts "log in" activity. In result, user still can put credentials on it. From user point of view: he change size, put credentials and after confirm, app show him again logging page. It looks very susspicious, that's why I have to change it. I don't need "split-screen" functionality, but I wasn't enable to turn it off neither. |
My Android devices unfortunately don't seem to support this. I think the main complication to reproduce (and possibly find a fix for) this might be the MsAdal plugin. Can you think of a super simple app that does not use this plugin but still can replicate the behavior you describe? |
On a more general note: |
I've already got both links, and I try to add 'android:resizeableActivity="false"' via configuration, but in all devices and simulators I have, it doesn't prevent resize or user actions, but only shows terribly ugly warning, like this one: I will leave this message if I can not do anything more. |
Just noting that I'm able to reproduce this Android 9. While in multi-window, it seems like the webview restarts everytime the window is resized. Personally in my apps, I would like to be able to disable multi-window... but I feel like this is a feature that should be disabled by default especially if it doesn't work out of the box. I'll post some information below that might be helpful. I may tackle this over the weekend if time permits. Android documentation about multi-window can be found here Specifically the There are two important bits of information...
So
But it sounds like it will only work if the target SDK is >= 24. The current master in cordova-android has target SDK set to 28 so we should be safe there. But the behaviour @kamilSarapuk described appears to match this notice. |
I was able to confirm on a simple app (created by using With I'm not sure what is involved in making Cordova work in multi-window mode (that is, to prevent the webview from reloading when entering multi-window mode or when the windows resized). So I feel like Note that you can accomplish the same thing by adding the following to the config... <widget ... xmlns:android="http://schemas.android.com/apk/res/android">
<edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge">
<application android:resizeableActivity="false"></application>
</edit-config>
</widget> |
Thank you for help, it worked. I searched the repository to check what I was doing wrong: when typing "edit-config" I had to do some syntax error, and the effect of the message itself gave android: resizeableActivity = "false" set in activity. |
I believe this issue is still valid and should be reopened: split screen still triggers a restart of the activity. According to https://issues.apache.org/jira/browse/CB-10841?focusedCommentId=15246741&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15246741 this can be fixed simply by adding |
Please open a new issue with a proper description @ttencate, seems like @kamilSarapuk considered his individual problem fixed - but very possible that there is a more general one still present. |
I've got a problem with Cordova, when user turn on split-screen on Android.
When it happen, app restarts and it is fine. Problem is when user changing screen size on login (MsAdal Plugin - other activity). Boths activities are restarted, but if user fill credentials and this page is closed, he sees first page on mainActivity. It is possible to kill all other activities and reopen only main?
I lost couple of days to find a way out, but with no result. I found that this problem exist in all new project, so I don't know what I can provide from code.
The text was updated successfully, but these errors were encountered: