Use the PackageManager API for this:

http://code.google.com/android/reference/android/content/pm/PackageManager.html

On Sep 18, 2:02 pm, Anshul <[EMAIL PROTECTED]> wrote:
> I am writing an app that would look for other services (each in its
> own apk) installed on the phone and would start them. To achieve this,
> I was thinking of listing the /data/app directory and find the name of
> the installed APKs and start them as a service using StartService
> function with the name of the APKs as the intent.
>
> When I try to list the data/app directory the list comes out to be
> empty. Probably it is the security issue and the application is not
> allowed to list this directory. Is there any other way I could achieve
> what I am trying to do?
>
> I don't want to specify the names of all the services to start in the
> activity trying to start these services so that I can install any
> additional service to be started later on without modifyng the main
> activity.
>
> Could I achieve this uisng intent filters somehow?
>
> Thanks,
> -Anshul
--~--~---------~--~----~------------~-------~--~----~
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
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to