Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uninstall Android App Before Each Debug

I am developing an Android app using Eclipse 3.7.2 with the Android SDK installed. I was wondering if there is a setting in Eclipse which when launching the debugger will automatically uninstall any previously existing versions of an app from the device?

For example, if I have an app developing, every time I make a change to the app I want to uninstall the old app completely from the phone and install the new one.

like image 300
David Avatar asked Jun 19 '12 16:06

David


People also ask

Is it possible to detect Android app uninstall?

Detection of app uninstalls can be made by sending silent push notifications. Notifications that are not created on the devices of the app users are called silent push notifications. You can keep track of app uninstalls by sending silent push notifications to all devices where your app is installed.


1 Answers

  1. Right Click your Project
  2. Properties
  3. Builder
  4. New
  5. Program
  6. In Name field, type "uninstall" for a name (no quotes needed)
  7. In location, use Browse file system button and target your adb (something like C:\Users\petey\Android\android-sdk\platform-tools\adb.exe)
  8. In arguments, "uninstall your.app.package.goes.here" (no quotes needed)
  9. Hit OK
  10. Select uninstall
  11. Hit the Up button until its on the top

Now you should be able to debug & run your app and it will uninstall everytime.

If this is too much and yer on windows Keep a Run dialog open (Start key and r button at same time) and type "adb uninstall your.app.package.goes.here" (no quotes). The run dialog has autocomplete and history to make life easier. You could also do this by terminal or command prompt too. Make sure that platform-tools is in your path tho.

like image 188
petey Avatar answered Oct 17 '22 07:10

petey