-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
rotating screen causes import / export to stop #85
Comments
Thanks for reporting this - I have confirmed the problem. There are apparently a number of methods for dealing with this issue, of various complexity and robustness; for (my own) reference, see here, here, here, here, and here. It would be nice to fix this, although I don't see it as a major problem, so I'm not going to make fixing it a priority, and I'll probably only fix it if I can work out how to do so without too much work. |
I don't know if this is related, but I find other things can kill an import process also, like switching to another app and coming back. Is this expected or related? With a big import I find myself almost afraid to do anything except periodically tap white space on the screen to keep the phone awake... (It does seem to survive the screen shutting off and locking...though I'm not sure it continues to run.) |
Probably related. As I've said above, it would be nice to fix this, but I haven't made it a priority. The import should continue to run even if the screen shuts off and locks, though |
I had this issue with my own app as well. The fix is very easy and straightforward, you just need to set screenOrientation for each activity in your manifest to "portrait" and that will lock the orientation regardless of whether the phone has auto-rotation enabled.
|
Thank you! It looks like that setting Looking around, I'm not sure what the ideal value for Thanks again. |
You're right about the other specified issues. For my application, I had to move some of my work to a persistent notification thread (one of the few things allowed to bypass androids sometimes overzealous unloading mechanism). Along with disabling battery optimization for the app, which requires user interaction to do. This also requires inter-activity and/or inter-thread communications in order for the work to communicate with the UI. Which is not entirely simple to implement (but not stupidly hard either). But then, all of my knowledge is based on Java Android, not Kotlin, so I don't know if things are any different in that arena. Most of the code I maintain is legacy (read: very old), so there may be better ways to do things in later versions of android I'm not aware of. As for the orientation, I think "portrait" is most appropriate for your app, as your UI is most suitable to portrait use. "nosensor" or "locked" will allow the app to open in landscape or reverse portrait, it just won't change afterwords. And "sensorPortrait" allows the user to flip the device upside down, if the device configuration allows it, which could cause the problem we're trying to avoid. |
Lock Main Activity screen orientation to prevent screen rotation from causing the termination of app operations. Addresses: #85
I've decided to go with I'm leaving this issue open, since although locking the orientation should solve the OP's problem, it won't help the case of leaving the app while an operation is running. Fixing that will probably require something along the lines of what you suggest above. I don't currently plan to implement such a solution, since it would require significant work for limited benefit, but I'll leave this issue open for further discussion. |
hi there -
thank you for sms-ie - it seems to work as intended :) i just noted that rotating the screen breaks the import-/export process.
The text was updated successfully, but these errors were encountered: