what is the best way to list all services that start with the phone? Is there a SDK class, or should I check some system files manually?
As @Falmarri points out you should consider to look for all apps that deploy BroadcastReceivers listening to ACTION_BOOT_COMPLETED action.
You might therefore hook up the following:
mPackageManager = getPackageManager();
List<ResolveInfo> resolveInfoList = mPackageManager.queryBroadcastReceivers(new intent(Intent.ACTION_BOOT_COMPLETED), 0);
And since this might take a time, use handler and a thread or an AsyncTask to get the list (with maybe an additional app info and/or icon etc.).
And as for the list of running services , you might check this code snippet here .
Have fun.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.