0

I developed an app using Android Studio and I have a problem with updates. Whether I install an updated version of APK at the debugging process, or I update the APK on Google Play Store, the changes aren't seen until I uninstall the app completely and reinstall it again. I don't know what can cause that situation, as I thought that changes apply through installing an updated APK on present one.

I would appriciate any help Thank's

Jane
  • 1
  • 3
  • what kind of changes? – egoldx May 16 '17 at 12:50
  • Are you referring to a combination of the two? aka, having a debug version on, then trying to update from google play? They are not compatible with each other, and re-install is required. If you are trying to update from google play, when you have a version from google play.. then im not sure – IAmGroot May 16 '17 at 12:51
  • By changes I mean any changes in the code. For example adding conditions or working with DB. I'm talking about situations when I'm trying to update a debug APK with another debug APK, and updating released APK with the new version that is published on the play store. I mean I do make a difference between the two. – Jane May 16 '17 at 12:53
  • You need migrations I believe – Eenvincible May 16 '17 at 13:19

1 Answers1

0

Comment: For example adding conditions or working with DB.

Whenever you update the Values in the DB table or inserting new Columns in the Table, you are required to change the version of the SQLite-DB and check the version number to simply remove the old DB. Than Once you update the APK after changes in the SQLite Table either from the Google PlayStore or Debug process, it will check the DB version to update the newer version. Then you don't need to uninstall the application and re-install it.

  • Thank's for the answer, I do upgrade DB version whenever I make structure changes, though I didn't know there's a need for that when updating values. But anyway, I have the problem even when I don't touch the DB, and just change the formation of some `if` statement - for example I work with `AlarmManager`, and I added a condition that checks whether the current time is greater than the time I want to set the alarm to. The version before the condition didn't fire the alarms right, while the version with condition did, but only after I re-installed. Checked several times, on different devices. – Jane May 16 '17 at 13:30
  • Whenever you changes some minor or major parts in the code with the Debug process, just clear the App cache and clean the project from the Android studio and rebuilt that app. From the Google playstore I am not sure why it behave to uninstall and reinstall the application for the changes made by you. @user3460551 – Muhammad Waseem May 16 '17 at 13:57