From 32461bab605a48417c34d3a0e1ffe373dc4a3bd4 Mon Sep 17 00:00:00 2001 From: Pogman <subaziro@gmail.com> Date: Sat, 18 Feb 2017 15:01:49 +0000 Subject: [PATCH] configChanges="uiMode" added to avoid restart of AsyncTasks when phone is plugged into charger/dock (for phones that can do usb otg & charging simultaneously --- app/src/main/AndroidManifest.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 17456ec..bf783b6 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -31,11 +31,13 @@ <!-- I have set screenOrientation to "portrait" to avoid the restart of AsyncTasks when you rotate the phone --> + <!-- configChanges="uiMode" added to avoid restart of AsyncTasks when phone is plugged into charger/dock (for phones that can do usb otg & charging simultaneously --> <activity android:name=".medtronic.MainActivity" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:launchMode="singleTask" + android:configChanges="uiMode" android:screenOrientation="portrait"> <intent-filter android:icon="@drawable/ic_launcher"> -- GitLab