-2

I want to create an add-on for an app, which the user can download from the Play store separately, and it will function with the aforementioned app that i've created.

I am using service, as this is the only clean way that I've come across for this. It works well with the "Base App" which I've created but I have no way of having it get removed when the user uninstalls the "Base App". I do know that i can essentially "Throw a dialog" up if the user attempts to uninstall my app, but i feel that has a more malicious feeling to it than what I intend. I don't want to interfere with the uninstalling of my app, simply I want to have the secondary addon service be uninstalled too.

Cactus
  • 27,075
  • 9
  • 69
  • 149
miversen33
  • 573
  • 5
  • 19
  • random down vote with no answer, comment, or explanation as to why or a link to something? thats cool i guess – miversen33 Jan 21 '15 at 01:03
  • I must agree with the PO. I do not see why the question should be down voted. The question is quite clear IMO. In any case, down vote should be accompany with explanation and suggestions for improvement. – trungdinhtrong Jan 21 '15 at 01:30
  • You can actually monitor the broadcast to see if an app is being uninstalled. Is that what you are looking for? If yes take a look at this: http://stackoverflow.com/questions/10297149/android-listen-for-app-installed-upgraded-broadcast-message. At the least you can show a message reminding your user of uninstalling your add-on apps, as I am not so sure if you can automatically uninstalling yours – trungdinhtrong Jan 21 '15 at 01:36
  • Thank you cactus, for correcting and making this acceptable to read. to the last comment, I thought of this soon after i posted the question. I believe that may be an option, but i would prefer a silent uninstall. Like I said in the question, I don't necessarily want to have a pop-up come up saying something, as it may be viewed as "malicious", though if need be, that is a route I am willing to take. – miversen33 Jan 21 '15 at 01:54
  • I kind of assume that there is no way you can automatically uninstall your app, since that is what I expect from android (I would be angry if my app ininstall itself :)) - but Im not 100%. Just a suggestion, if you have to suggest user to uninstall, may be use notification instead of pop-up message? – trungdinhtrong Jan 21 '15 at 02:00
  • That seems acceptable to me. If you can post that as an actual answer, I will accept as this is neither infringing on the user's space and will still let the user know that installed dependencies need to be uninstalled. Thanks! – miversen33 Jan 21 '15 at 02:01

1 Answers1

0

You can listen to the broadcast to see if your main app is being uninstalled. See this for more info:

Android: Listen for app installed / upgraded broadcast message

When you detect that your main app is removed, your add-on app can suggest/remind users to uninstall add-on app using Android notification.

Community
  • 1
  • 1
trungdinhtrong
  • 2,604
  • 2
  • 17
  • 26