Don't put anything in your manifest. Just start an activity with the DELETE action and data "package:<your package name>".
On Sun, Jul 5, 2009 at 11:56 PM, aljo <aljochim...@gmail.com> wrote: > > I don't know if this is the one you meant about launching uninstaller > activity but I found something which might be the same... > > http://android.amberfog.com/ > > I put this in the manifest... > > <activity android:name=".UninstallerActivity"> > <intent-filter> > <action android:name="android.intent.action.VIEW" /> > <action android:name="android.intent.action.DELETE" /> > <category android:name="android.intent.category.DEFAULT" /> > <data android:scheme="package" /> > </intent-filter> > </activity> > > then this one in the source... > > Uri packageURI = Uri.parse("package:com.android.myapp"); > Intent uninstallIntent = new Intent(Intent.ACTION_DELETE, packageURI); > startActivity(uninstallIntent); > > It redirected me to the uninstall confirmation... > > How about before the uninstaller activity... the window where it shows > the information of the applications you selected... Whats the name of > that activity?? > > How do I redirect to that activity?? > > On Jul 6, 11:01 am, aljo <aljochim...@gmail.com> wrote: > > Hmmm... that's why I can't see the deletePackage method when I type > > getPackageManager(). What do you mean I need to launch the uninstaller > > activity? Is that the uninstaller app when you go to Settings/ > > Applications/ManageApplications in the phone?? > > > > If that's the case, is it not possible yet to uninstall apps using our > > own applications? > > > > Is there a way or code to just redirect to the ManageApplications > > window using my application? > > > > On Jul 6, 9:32 am, Dianne Hackborn <hack...@android.com> wrote: > > > > > > > > > The deletePackage method is not available to third party apps. To > uninstall > > > an app you need to launch the uninstaller activity to have the user > confirm > > > what is going on. > > > > > On Sat, Jul 4, 2009 at 10:43 AM, Roman < > roman.baumgaert...@t-mobile.com>wrote: > > > > > > Check out the UninstallAppProgress.java source in packages/apps/ > > > > PackageInstaller/src/com/android/packageinstaller > > > > > > Have a look at the method and follow the flow of deletePackage. You > > > > should be able to find out what exactly is called. > > > > > > public void initView() { > > > > requestWindowFeature(Window.FEATURE_NO_TITLE); > > > > setContentView(R.layout.op_progress); > > > > //initialize views > > > > PackageUtil.initAppSnippet(this, mAppInfo, R.id.app_snippet); > > > > TextView installTextView = (TextView)findViewById > > > > (R.id.center_text); > > > > installTextView.setText(R.string.uninstalling); > > > > final ProgressBar progressBar = (ProgressBar) findViewById > > > > (R.id.progress_bar); > > > > progressBar.setIndeterminate(true); > > > > PackageDeleteObserver observer = new PackageDeleteObserver(); > > > > getPackageManager().deletePackage(mAppInfo.packageName, > > > > observer, 0); > > > > } > > > > > > -- > > > > Roman Baumgaertner > > > > Sr. SW Engineer-OSDC > > > > ·T· · ·Mobile· stick together > > > > The views, opinions and statements in this email are those of the > > > > author solely in their individual capacity, and do not necessarily > > > > represent those of T-Mobile USA, Inc. > > > > > > On Jul 2, 7:54 pm, aljo <aljochim...@gmail.com> wrote: > > > > > I wan't to uninstall applications using my application... I can > > > > > retrieve the list of packages installed but I don't know how to > remove > > > > > them... I used the PackageManager class, getInstalledApplications() > > > > > method... I can't find any method like removeApplication() or > > > > > uninstallApplication(). > > > > > > > the only method I saw in this class is the > removePackageFromPreferred > > > > > (String packageName) method... It retrieves a list of preferred > > > > > packages.. I don't exactly know what preferred packages means or > > > > > somehow how to retrieve them... I tried to put a package name in > the > > > > > method "removePackageFromPreferred (com.dev5.fivegame)" but it > gives > > > > > an error... > > > > > > > I'm kinda new to these stuffs so pardon me for my questions... > > > > > -- > > > Dianne Hackborn > > > Android framework engineer > > > hack...@android.com > > > > > Note: please don't send private questions to me, as I don't have time > to > > > provide private support, and so won't reply to such e-mails. All such > > > questions should be posted on public forums, where I and others can see > and > > > answer them.- Hide quoted text - > > > > > - Show quoted text -- Hide quoted text - > > > > - Show quoted text - > > > -- Dianne Hackborn Android framework engineer hack...@android.com Note: please don't send private questions to me, as I don't have time to provide private support, and so won't reply to such e-mails. All such questions should be posted on public forums, where I and others can see and answer them. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---