andrew-bierman/PackRat

Issue: Downloaded Maps Not Saving in User Accounts

EngrAJ8888 opened this issue ยท 8 comments

Describe the bug
I've noticed that the maps we saved aren't staying on our accounts. Whenever I download a new version of the app, the maps previously downloaded disappear.

To Reproduce
Steps to reproduce the behavior:

  1. Navigate to "Search Destination"
  2. Enter the desired City/Country/Trail
  3. Open the map and click on the download button
  4. Return to the menu and select "Downloaded Maps"
  5. Log out of your account and download the latest APK.

Expected behavior
Downloaded maps should be saved in the user's account.

@EngrAJ8888 with the current mapbox api it not possible to keep the downloaded map after upgrading the application.

things that can be done to have a similar outcome:

  • On click the download button to download the map, we should also save the pack informations in user account as offline pack.
  • Each time the user install the application and login into their account, we show the saved packs in the Download map screen with an option to download the maps again if there is no downloaded maps in device.

@EngrAJ8888 what do you think?

My message may look confusing, here is another way to view it:

Currently the map we download is stored in the place where the android system will automatically delete after uninstalling the application.
To fix that we can:
1 - change the storage location: unfortunately this option is not available.
2 - save the meta data of the map directly on the user profile.
The first method is not possible yet with the version of map api we have.
The second version is possible, the user will list his offline maps, but will need to download the map again after each new installation.

Hope that will be helpful, and I would like to know if I'm right and it is fine to implement the second method?

Hi @Tadjaur, thank you for the detailed explanation. Let's proceed with implementing the second option.

@andrew-bierman - what are your thoughts on this?

Thank you both!

Second option is best if it's not a big lift to integrate. I think the meta data should be all we need to re trigger a download on re install

Thanks @Tadjaur

Hi @Tadjaur, Just sending a gentle follow-up on this. Thanks!

Hi @Tadjaur, Just sending a gentle follow-up on this. Thanks!

Hi @EngrAJ8888, I apologize for not getting back to you sooner on this.
This task is almost complete I should be able to have a pr today or tomorrow.

If I have any issue in the meantime, I will let you know.

@EngrAJ8888 pr available at #1114

Hi @Tadjaur, noted. I'll check as soon as the link is available for preview. Thanks for the update!