Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimizing the app with "no background processes” removes offline layers to add from the list and then trying to add layers crashes the app #6219

Open
dbemke opened this issue Jun 21, 2024 · 2 comments · May be fixed by #6243
Assignees
Milestone

Comments

@dbemke
Copy link

dbemke commented Jun 21, 2024

ODK Collect version

the master version 7d30e18

Android version

10, 14

Device used

Redmi 9T, Pixel 7a

Problem description

Minimizing the app with "no background processes” settings on removes offline layers to add from the list and then trying to add layers crashes the app.
crashLayers

Steps to reproduce the problem

  1. Set "no background processes" in the device.
  2. Go to any form with maps and open the map.
  3. Tap the offline layers icon, "add layers” and select some layers to add.
  4. While on "Add layers” with the list of layer to add, minimize the app and go to a different app.
  5. Go back to Collect (the list of layers to add is empty).
  6. Tap "add layers”.

Expected behavior

I'm not sure what is the expected result - if it's possible to keep offline layers on the list in this case or it's better to close all the dialogs/bottom sheets

@seadowg seadowg added this to the v2024.2.x milestone Jun 24, 2024
@grzesiek2010 grzesiek2010 self-assigned this Jun 26, 2024
@grzesiek2010
Copy link
Member

This happens because we store selected layers (layers to import) using LiveData and it gets cleared on process death. @seadowg do you think it's worth the effort to keep that data using SavedStateHandle? I was rather thinking about dismissing that confirmation dialog and letting users select the layers again.

@seadowg
Copy link
Member

seadowg commented Jun 26, 2024

@seadowg do you think it's worth the effort to keep that data using SavedStateHandle? I was rather thinking about dismissing that confirmation dialog and letting users select the layers again.

I think for the moment we should just dismiss the dialog (going back to the picker) if this happens rather than investing in dealing with save state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: in progress
Development

Successfully merging a pull request may close this issue.

3 participants