Thanks Erel - if I could add to this discussion to show how one can collect the information about such an intent...
If you
don't have a usable B4A app yet you can get the system log contents using a free app from the Android Market:
1. First downloaded a log capture app from the Android Market. Here are a couple of suggestions:
Log Collector by Xtralogic
CatLog by Nolan Lawson
2. Then install any simple app - I used Bubble by Ben Zibble (a very handy app by the way)
The only reason to install this app is to uninstall it and take a look at the resulting log.
3. Once your choice of logging app and the Bubble app are installed you can go to Settings | Applications | Manage Applications
Then find the Bubble app and uninstall it.
4. Now go back to the home page and run your logging app. I used Log Collector because it allows me to easily send the log to myself via email.
5. Once you have the log file you can search through it for the text "android.intent.action.DELETE"
This line should show you the Intent the system used to remove the Bubble app. Here is what my log displayed:
08-29 13:47:30.458 I/ActivityManager( 1261): Starting activity: Intent { act=android.intent.action.DELETE dat=package:bz.ktk.bubble cmp=com.android.packageinstaller/.UninstallerActivity }
If you
do have a usable (runnable) B4A app you can view the log contents in the B4A Log panel (on the righthand side) - even though your app will be idle you can still remove the Bubble app and see the log contents as before. Just make sure the Filter checkbox is NOT checked.
To use Erel's code to remove the Bubble app in your own B4A app you would then need to use the results from above in your code:
Dim i As Intent
i.Initialize("android.intent.action.DELETE", "package:bz.ktk.bubble")
StartActivity(i)
In addition to performing system tasks such as the uninstall you can also use this approach to determine how to run any other intent that a 3rd party app might support - such as downloading a PDF file from a website to the SDcard ... and then using it again to open that local PDF file.
It's all pretty straight forward once you see how it is done in the log file.
I hope this helps,
-Kim