While testing Anywhere Work Execution on Android 11 ( the issue is specific to Android 11), we noticed that when anywhere is set to background and some other application is opened, in some circumstances it is getting closed / crashes (this looks like application restarts when user brings it from background).
In this case client uses another mapping application on the same device (FieldMaps) which is memory hungry.
To carry on with the work the User has to again enter login credentials and start from scratch, for example if user was on WO Details page, after the restart the application will be back on the WO List page and user has to find the WO, open its details which takes time.
Upon investigation we found that the issue is not specific to just Anywhere, it appears that this is a new aggressive memory management in A11 which closes background apps if the active app needs more memory.
The following line from adb logs demonstrate that it is low memory kernel daemon () is killing the application
05-26 12:14:32.447 476 476 I lmkd : Reclaim 'com.ibm.iot.maximoanywhere.workexecution' (32724), uid 10311, oom_adj 900, state 16 to free 181884kB
Recommendation from Google for this is that an application when it is closed should handle this and when restarted should bring user to the same context (screen form / data element) where it was closed.
Refer here https://www.androidcookbook.info/android-system/activity-lifecycle.html
"If an activity is paused or stopped, the system can drop it from memory either by asking it to finish (calling its finishO method), or simply killing its process. When it is displayed again to the user, it must be completely restarted and restored to its previous state."
This bold piece is not happening in Anywhere. When it is stopped by the OS and later restarted, it just starts from the beginning. In this sense Anywhere 764 doesn't follow the OS guidelines.
This doesn't happen with Anywhere - it just restarts.
Business use case:
- have a device with Android 11 and 4 GB of RAM (this is client's standard device - Samsung Tab Active 3), any A11 device demonstrate the same behavior, RAM size may matter
- open Anywhere, open a WO details
-Open File viewer and open a large PDF file (2.5 GB or more)
- Click the Android button to see the list of running apps
- Select Anywhere in it to go back to Anywhere
Expected: Anywhere is opened on the same WO Details page and all data entered previously on the page is preserved.
Actual: Anywhere is restarted and presents the login page, upon entering credentials and opening the same WO details, all data entered on this page is lost.
<end of case>
Impact: Users are frustrated as they are losing data and have to enter credentials again. In the SSO scenario they may need to enter MFA that adds to the frustration.
Desired behavior: When closed, Work Execution saves all data entered on the page. On subsequen restart application puts user directly to the form where the user was before the app was shut down.
The state of an application is controlled outside of our mobile app. As stated, the device can close/hibernate apps. Also the fact that the onboarding experience of mobile when connected is to sinchronize, going back to record/page that perhaps doesn't even exist in the device can be even more dangerous. Thanks for your feedback, but we're not considering this idea for future development.