Adventure of an Android application when switching between personal and working modes on Samsung Knox

My application gets killed every time, switching from the Samsung Knox module to a private modus.

ADB Log:

04-25 16:25:41.868 2945-3700/? I/ActivityManager: Killing 24549:com.myapp.name/u100a171 (adj 10): cached #2 04-25 16:25:41.988 2945-3118/? W/InputDispatcher: channel '354a1caa com.myapp.name/com.myapp.name.app (server)' ~ Consumer closed input channel or an error occurred. events=0x9 04-25 16:25:41.988 2945-3118/? E/InputDispatcher: channel '354a1caa com.myapp.name/com.myapp.name.app (server)' ~ Channel is unrecoverably broken and will be disposed! 04-25 16:25:42.038 2945-3614/? W/InputDispatcher: Attempted to unregister already unregistered input channel '354a1caa com.myapp.name/com.myapp.name.app (server)' 04-25 16:25:42.038 2945-3614/? I/WindowState: WIN DEATH: Window{354a1caa u100 com.myapp.name/com.myapp.name.app} 

What could be causing this behavior?

Perhaps this is due to the definition of AndroidManifest as the only task, because Knox is trying to restart the personal modus?

 <activity android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|uiMode" ...> 

Perhaps this is due to storage issues due to setting / unmounting areas?

On Android 5.1.1 with Samsung Knox 2.4.1

Failed to play this on Android7 device.

Any help is appreciated!

+5
source share
1 answer

this may be because the system is trying to clear the cache when switching applications.

The caching mechanism differs from device to device and OS to OS. There may also be some kind of battery saver app that can do this.

I think that other applications may be killed when switching.

+3
source

Source: https://habr.com/ru/post/1267142/


All Articles