You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the store version 2024.1.3, the master version 2a06bf5
Android version
12+
Device used
Pixel 7a
Problem description
On Android 12+ a savepoint isn’t created if Collect is closed via going to "Latest apps” (with navigation using 3 buttons, click the square) and swiping Collect up.
Tap the square navigation button to see the "Latest apps”.
Swipe up so that Collect is closed.
Go back to Collect and open the form again.
A save point will be created if the user switches to another app using "Latest apps" (or hits the home button). This means that in reality, users will usually get save points when switching away from Collect.
Expected behavior
Depending on the version of Collect there should be:
2024.1.3 a form with a savepoint opens in the hierarchy view
after the master version (2a06bf5) was merged a recovery dialog should appear
Notes
It looks like Android 12 changes how "Recent apps" interacts with Activity#onSaveInstanceState which we use to trigger a save point. In Android 11 and under, opening recent apps is enough to cause onSaveInstanceState to be called, but in later Android versions the method isn't called until another app is switched to (or the user returns to the Home Screen). We'll need to find another way to trigger a save point so that it works across API versions.
The text was updated successfully, but these errors were encountered:
Something similar is happening on Pixel 3a, Android 12 but only after Fresh Install
Steps to reproduce
Freshly install Collect and open any form
Don’t fill anything in the first question.
Tap the square navigation button to see the "Latest apps”.
Swipe up so that Collect is closed.
Go back to Collect and open the form again.
The Recover dialog will not show
Expected behavior
The Recover dialog should be shown
Other information:
It is happening on Android 12 only after Fresh install and only at the first attempt!
If you'll repeat steps 1-5 then the savepoint will be created and the recovery dialog will appear
I've done some testing and it looks like this is a problem on Android 12+. It seems like it's a change in Android's "Recent Apps" (that I can't find referenced anywhere). I'll update the issue description with my findings.
We should discuss if we want to fix this as-is or change the feature so save points are created differently (i.e. on a timer on questions are answered).
ODK Collect version
the store version 2024.1.3, the master version 2a06bf5
Android version
12+
Device used
Pixel 7a
Problem description
On Android 12+ a savepoint isn’t created if Collect is closed via going to "Latest apps” (with navigation using 3 buttons, click the square) and swiping Collect up.
The issue doesn't occur on Android 10 (Redmi 9t), other devices will be described below
Pixel 7a Android 14 example:
https://github.com/getodk/collect/assets/56479916/4fd5f669-2605-464b-a4b9-eed51b4a4c0f
Steps to reproduce the problem
A save point will be created if the user switches to another app using "Latest apps" (or hits the home button). This means that in reality, users will usually get save points when switching away from Collect.
Expected behavior
Depending on the version of Collect there should be:
Notes
It looks like Android 12 changes how "Recent apps" interacts with
Activity#onSaveInstanceState
which we use to trigger a save point. In Android 11 and under, opening recent apps is enough to causeonSaveInstanceState
to be called, but in later Android versions the method isn't called until another app is switched to (or the user returns to the Home Screen). We'll need to find another way to trigger a save point so that it works across API versions.The text was updated successfully, but these errors were encountered: