I am looking for a reliable way to programmatically find and list all available services in an Android device (both running and not running).
In the past I have used the following:
List list = activityManager.getRunningServices(maxNum);
I have created an example here
You can enumerate all packages and retrieve their services:
List<PackageInfo> pkgs = getPackageManager().getInstalledPackages(PackageManager.GET_SERVICES);
for(PackageInfo pkg : pkgs) {
// You can now use pkg.services
}
Compatible to API 1.