tags:

views:

58

answers:

1

Is there a standard native Android content provider that will return data listing all of the apps currently installed on the cellphone. Something like open()/readdir() on a Linux bin directory.

Given that you know an app is installed on an Android cellphone, and you know that apps name, how do you launch that app from a completely different and unrelated app. You might not know which Intents/Broadcasts/URIs the app you want to launch is listening for. And not all Android apps are written to respond to Intent/URI broadcasts or requests....

+1  A: 

The idea is that you don't care what apps are on the phone, you only care about what intents they are listening for. If you need to browse for a file what does it matter which file browser the person has installed? All you need to do is tell the OS that you want to pick a file and let the OS handle that.

CaseyB
OK. If I tell the OS to pick a file, and that returns the correct .apk file for the app I want to launch, then how do I run that app/file?Consider the following example. Within my app I want the user to run Android VNC. I know that the Android VNC app has been installed on the cellphone. I could just tell the user to run the VNC app, but it is a better GUI to ask the user if they want to launch VNC or Cancel. If the user presses the "Run VNC" button, and not the Cancel button, then I want to launch the Android VNC app. How do I know which Intents the Android VNC app is listening for, if any?
JohnM
In the file picking case the OS wouldn't return the apk to you. It would launch the correct app and that app would return the information you need. In the case of wanting to launch a vnc app you would need to get the class from the OS using the complete package name via reflection and use that in the intent sent to the OS and have the OS launch it.
CaseyB