For example, I click on the QQ this application, I want to listen to a user clicks on this program, or listening to an unknown user starts the program. Please advise!
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
You can see the source code under activitymanager
Reply:
I do this only in the APP layer, it seems useless ActivityManager
Reply:
Click to listen to decompile apk package name to see manifest. xml you can know his name
starter packThen I remember a task manager Lie can find this package names referenced to explain the program started
Reply:
Did not know it?
Reply:
Online, ah! ! ! !
Reply:
Like application launcher system will send a broadcast to
Reply:
Fiddle about activitymanager, you can get the most current at the top of the window appinfo, then you can get all the things about this app
Reply:
If you are listening specific program, as long as the current stack to determine the first activity of the package name is not to listen to that program. . . The program locks the market is doing
Reply:
/ **
* Is used to determine whether the service is running.
* @ Param context
* @ Param className name service of judgment: the package name + class name
* @ Return true running, false is not running
* /
public boolean isServiceRunning (Context context, String className) {
boolean isRunning = false;
ActivityManager activityManager =
(ActivityManager) context.getSystemService (ACTIVITY_SERVICE);
ListserviceList
= ActivityManager.getRunningServices (Integer.MAX_VALUE);
if (! (serviceList.size ()> 0)) {
return false;
}
for (int i = 0; i
if (serviceList.get (i). service.getClassName (). equals (className) == true) {
isRunning = true;
break;
}
}
Log.i (TAG, "service is running ==?" + IsRunning);
return isRunning;
}
Reply:
Find detailed code
Reply:
Reply:
Landlord this problem solved?
Reply:
With demand! ! lywhlao@qq.com
Reply:
I also find the answer to this question. Who knows, solution.
Reply:
Landlord. . I also want you to ask for advice in this issue. . Expedited ah. . . .
Reply:
I also want to know the landlord to solve this problem no ah. Do not want to write directly to the background server unlimited run. Battery too much.
No comments:
Post a Comment