3

I have 5 devices currently I'm testing my Android app with. I'm running the latest beta version on most of them installed properly from the Play Store. I started a debug version on one of these with Android 11 recently. The debugged app has the same App ID as the one installed from the Play Store.

As soon as the debug version started it didn't inherit the settings and the SQLite database which the store beta version saw, so it started with a clean slate. Now I performed some manual tests and I'd like to return to the Play Store beta version.

I'd want to return back to the Play Store beta version with its settings and SQLite data. If I'd uninstall the debug version and then install the beta again I'd loose those data. Maybe I've already lost it? I'm not sure if the system overwrites the Play Store version completely, or it just installs the debug on the side and I can return to it without reinstallation?

Csaba Toth
  • 10,021
  • 5
  • 75
  • 121

1 Answers1

0

Here is my experience: the signature of the original (release) app will be different than the debug version. Furthermore the debug version's signature may differ from machine-to-machine like it happened when I was using my main Linux rig vs a spare Windows laptop. The two debug version installed themselves over each other, effective wiping each other.

If you try the installation manually by adb it complains about the situation (the app is already installed but with a different signature). You can force the installation (which is what Android Studio does by default) but that will be equal to an app reinstall, and thus wipe of all the data.

I advise to have a full data backup and restore functionality in the app and utilize that. I'll update this answer if I come across a better solution.

Csaba Toth
  • 10,021
  • 5
  • 75
  • 121