Wednesday, February 19, 2014

android 4.0 USER_PRESENT listen less? ?


saying that we all know is that we can still Sign USER_PRESENT the radio, then you can make your program the user to restart after being turned off, but I met a brother [size = 13px] My question is still registered in the manifest of this broadcast, after running well, but I set the system] in [-> After [the application] is selected in this program click [Stop] force, over android4.0 on the real machine can not listen to the radio, but I was on the phone can monitor android2.3 get online but could not find a solution, find great God ~ ~ <-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
4.0 version is not the same above and below
Reply:
I ask what the difference is Mile? How to solve this problem? My ultimate goal is to make my app not be stopped, but also timely to open the case stopped
Reply:
Landlord, I have studied this problem for a while, and finally found that if the application is not tripartite system privileges, then no solution.
For the following reasons:
Google for security reasons (to avoid malware, viruses, ah do bad things, but also improve efficiency), 4.0 later added a two Flag: FLAG_INCLUDE_STOPPED_PACKAGES and FLAG_EXCLUDE_STOPPED_PACKAGES. Broadcasting System issued with FLAG_EXCLUDE_STOPPED_PACKAGES this flag, in the case did not start the application process can not receive.
Of course, if a user can be defined with FLAG_INCLUDE_STOPPED_PACKAGES broadcast this flag, so you can start even if the application did not receive the broadcast (unfortunately ah! Can be customized tripartite broadcast).

Reply:
Thank # 3 Floor answer, that now I want the program to achieve by listening to this broadcast restart no solution slightly. Is there no other way?
Reply:
The landlord Hello, do not know what your problem resolved? I also have a demand like you? If the issue is resolved to share under it? Grateful ~ 2625590854 Thank you ~

No comments:

Post a Comment