s.maks
s.maks

Reputation: 2613

Programmatically find application modules

I have an app that manage some services. These services developed as separate module-applications and can be of two types - sensors and callbacks. When main application starts I want to know is there some modules installed on device? If yes, which apps are modules and what type they have? So the question is how can I find all module-applications installed on device and determine which type they have?

Upvotes: 0

Views: 152

Answers (1)

Michael Butscher
Michael Butscher

Reputation: 10959

Define appropriate intent-filters for your services which e.g. react on particular actions for sensor or callback.

In the controlling activity you can then create an intent for the desired action, and call getPackageManager().queryIntentServices(intent, flags) to get matching services.

Upvotes: 1

Related Questions