[android-developers] Re: How to write code to uninstall apk from device/emulator?
Kenny Yu wrote: Simply put the cmd to Java function: system(adb uninstall apt_name); I mean your code should invoke the commands exactly as 'adb' does. Kenny On Jan 3, 8:52 am, Dr. Tingrong Lu lutingr...@hotmail.com wrote: Hi, How to write code to uninstall apk from device/emulator? Could anyone drop a sample code? Thanks a lot! If the original poster was trying to uninstall an APK from within the device, I believe Shane Isbell is correct, and it cannot be done. In particular, system(adb uninstall apt_name) will not work -- adb is not an installed executable on the device, and I'm not sure there is a working system() call that would execute it. -- Mark Murphy (a Commons Guy) http://commonsware.com Android Training on the Ranch! -- Mar 16-20, 2009 http://www.bignerdranch.com/schedule.shtml --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
Simply put the cmd to Java function: system(adb uninstall apt_name); I mean your code should invoke the commands exactly as 'adb' does. Kenny On Jan 3, 8:52 am, Dr. Tingrong Lu lutingr...@hotmail.com wrote: Hi, How to write code to uninstall apk from device/emulator? Could anyone drop a sample code? Thanks a lot! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
This answer makes me sad, my boss ordered me to do that. - Original Message - From: Shane Isbell To: android-developers@googlegroups.com Sent: Saturday, January 03, 2009 3:36 PM Subject: [android-developers] Re: How to write code to uninstall apk from device/emulator? On Fri, Jan 2, 2009 at 11:23 PM, Dr. Tingrong Lu lutingr...@hotmail.com wrote: Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. You can't do it. Thanks - Original Message - From: kiran raj To: android-developers@googlegroups.com Sent: Saturday, January 03, 2009 2:33 PM Subject: [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
Dr. Lu, Don't be sad, I believe there must be a way:) PackageManager.installPackage is still there in cupcake branch. Maybe it's just not exposed in public sdk. On Sat, Jan 3, 2009 at 6:30 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: This answer makes me sad, my boss ordered me to do that. - Original Message - *From:* Shane Isbell shane.isb...@gmail.com *To:* android-developers@googlegroups.com *Sent:* Saturday, January 03, 2009 3:36 PM *Subject:* [android-developers] Re: How to write code to uninstall apk from device/emulator? On Fri, Jan 2, 2009 at 11:23 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. You can't do it. Thanks - Original Message - *From:* kiran raj mkkiran...@gmail.com *To:* android-developers@googlegroups.com *Sent:* Saturday, January 03, 2009 2:33 PM *Subject:* [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
Hi, You could uninstall app by sending an intent. Here is what we do in aTrackDog: Uri uri = Uri.fromParts(package, strPackageName, null); Intent it = new Intent(Intent.ACTION_DELETE, uri); startActivity(it); -- gasolin On 1月3日, 下午9時54分, freepine freep...@gmail.com wrote: Dr. Lu, Don't be sad, I believe there must be a way:) PackageManager.installPackage is still there in cupcake branch. Maybe it's just not exposed in public sdk. On Sat, Jan 3, 2009 at 6:30 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: This answer makes me sad, my boss ordered me to do that. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. Thanks - Original Message - From: kiran raj To: android-developers@googlegroups.com Sent: Saturday, January 03, 2009 2:33 PM Subject: [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---
[android-developers] Re: How to write code to uninstall apk from device/emulator?
On Fri, Jan 2, 2009 at 11:23 PM, Dr. Tingrong Lu lutingr...@hotmail.comwrote: Hi, Thanks for your reply. I mean how to write code to uninstall apk from device/emulator, not in an interactive commander line or shell. With SDK0.9, there's a method, packagemanager.deletePackage(), but with SDK1, that method is removed. I wonder how to uninstall apk with SDK1. You can't do it. Thanks - Original Message - *From:* kiran raj mkkiran...@gmail.com *To:* android-developers@googlegroups.com *Sent:* Saturday, January 03, 2009 2:33 PM *Subject:* [android-developers] Re: How to write code to uninstall apk from device/emulator? Hi , this is the coding for uninstall the apk file. *adb uninstall apk_filename in command mode *using emulator Go to the dev tools go to package browser then unistall the package name now ur emulator delelte that package Thank u --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~--~~~~--~~--~--~---