Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-8912] Android: Device rotation while device is locked causes the app to disengage from the filesystem

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2012-05-07T10:30:28.000+0000
Affected Version/sRelease 1.8.2
Fix Version/sRelease 2.1.0, Sprint 2012-09 API
ComponentsAndroid
Labelsapi
ReporterEric Cheng
AssigneeJosh Roesslein
Created2012-04-29T01:47:41.000+0000
Updated2017-03-14T04:42:23.000+0000

Description

PROBLEM If a device is rotated in while in the locked mode, the app disengages from the filesystem. TEST STEPS APK can be found here: https://appcelerator.teamworkpm.net/files/95446 1) Open up the app, login to load tickets. 2) While the app is opened up (anywhere in it is fine, but I was leaving it on the ticket summary), put the device to sleep 3) Now wake up the device and while the device is on the lock screen, rotate it! EXPECTED RESULTS The app would resume and rotate without losing data. ACTUAL RESULTS Data is removed from the app resulting in parts of the screen (columns of data) to disappear. Please see attached log file at 13:25:25

Attachments

FileDateSize
log.txt2012-04-29T01:47:41.000+000053749

Comments

  1. John V Pataki 2012-04-29

    The bad news: This issue is a little more than just the filesystem disengagement - the app basically goes berserk, filesystem (Ti.App.Properties) reads fail, database reads fail, the user interface gets all foobar'd The good news: I've narrowed this problem down to the switch from Android API level 11 to 13 which was done to handle theme decisions. I will work on making a test app available if I can - this may need to be taken private and allow developer to test on the pro-services app.
  2. John V Pataki 2012-04-29

    By the way, you can ignore the log file uploaded initially to this ticket - it won't tell you anything useful about the problem.
  3. Josh Roesslein 2012-04-30

    I'll need the test application to reproduce the issue before moving forward.
  4. John V Pataki 2012-04-30

    I haven't had the time to create a sample test app but you can pull this app from the appc repo and reproduce it - install the modules contained in the module-zips folder
  5. Josh Roesslein 2012-04-30

    To summarize the findings: This appears to be caused when setting the min SDK level to 13 or higher. Android added a new [configChanges](http://developer.android.com/guide/topics/manifest/activity-element.html#config) flag which if not set will cause a restart of the activity. A workaround is to customize the manifest and include "screenSize" and "smallestScreenSize" in the android:configChanges options. We can't generate these yet in the default manifest since we need to support API level 8.
  6. Eric Cheng 2012-05-04

    With the latest version of the app with Josh's fix, the rotation issue is fixed,but we could still reproduce the problem with these test steps: STEPS 1. Uninstall the app, re-install it, open it, 2. log in to http://appcelerator.irthsolutions.com/irthnet login: jsmith password: j11111 3. Do the initial sync, after the sync is finished. You will see 4 tickets. 4. U the Home button to get to the desktop. 5. Re-launch the app (go to Apps -> Click Utilisphere) RESULT -when resuming the app the screen is black for ~10seconds -when you see the app screen, no tickets are viewable (as if they disappeared).
  7. Eric Cheng 2012-05-07

    Ignore my previous post. The workaround posted by Josh addressed the device rotation issue.
  8. Vishal Duggal 2012-05-07

    Workaround provided works.
  9. Olga Romero 2013-01-18

    Unable to retrieve apk file from https://appcelerator.teamworkpm.net/files/95446, have no access. Timed out link http://appcelerator.irthsolutions.com/irthnet
  10. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source