0

I have an app on Google Play that uses a constantly running service to perform a specified task. Due to the nature that it is always running unless the user disables it, this seems to have caused problems with some users when I pushed out my first update. Some users report they must clear the cache a data of the updated app before it works properly, and others must uninstall and reinstall the app completely.

Is there a method whereby when users update my app, the old version is completely wiped away, before the new version is installed?

Thank you.

Dick Lucas
  • 12,289
  • 14
  • 49
  • 76
  • 1
    Can you reproduce this behavior on your local devices? Try and figure out what the actual issue that you're seeing is. This is pretty broad and general and hard to help you with as it stands. – Nathaniel D. Waggoner Jan 15 '14 at 16:29
  • 1
    I think there should be a tool provided to clear all app data before installing the update, if an app updates via Play store, the app is first uninstalled and then reinstalled without deleting the user data. Probably you can run some code before uninstalling/reinstalling but im not sure – Dediqated Jan 15 '14 at 16:30
  • @NathanielWaggoner When I update it on my device it works fine, I apologize for my broad description, I only have other users to go off of. I am in correspondence to get more information. – Dick Lucas Jan 15 '14 at 16:43
  • @Dediqated That is what I was hoping I could do, something like an onUninstall() command. I will continue to search for such a method and surely report back. – Dick Lucas Jan 15 '14 at 16:46
  • 1
    @Richard No need to apologize, it's just hard to provide help given the current info provided. As you get more info post it. I'll keep my eye on the question to see if I can help. – Nathaniel D. Waggoner Jan 15 '14 at 16:52
  • @Richard yeah the point is i don't know if it exists, but im very curious to see if it does exist. I'll try to search for it – Dediqated Jan 15 '14 at 17:01
  • maybe these will help? http://stackoverflow.com/questions/7144265/execute-android-code-after-installation and http://stackoverflow.com/questions/5132472/can-code-be-called-when-my-android-application-is-uninstalled – Dediqated Jan 15 '14 at 17:06

2 Answers2

0

I believe I was asking the wrong question, or at least it was not the proper way to solve the problem.

For future reference, users may find this question helpful: Clear Application's Data Programmatically

Community
  • 1
  • 1
Dick Lucas
  • 12,289
  • 14
  • 49
  • 76
-1

Make a new application : what you're explaining is that you need to completely uninstall the old app, so this cannot be an update, but rather a new install.

Antoine Marques
  • 1,379
  • 1
  • 8
  • 16
  • Antoine, I have many users that have my app installed. I don't want to lose this user base by making an entirely new application. Plus, this would only be a short term solution. – Dick Lucas Jan 15 '14 at 16:29