Wednesday, February 26, 2014
After android program closes, how to start their own
I now realize this function:
I realize android client silent installation (upgrade package themselves quietly), then the program automatically quit, but how to get the program up and running again own it?<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
First, the landlord is a tripartite application? Non-vendor-specific, right?
There is a silent install android program to achieve it?
As the landlord, want the program to run automatically up, 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).
In short: version 2.3 or below, you can receive the broadcast system startup by issuing program, now 4.0 and later blocked, it can not be done.
Reply:
If it is not ROM or handset vendors, to give it
Reply:
Not necessarily, my phone can get root privileges. I think there must be a way to achieve.
Reply:
Your cell phone can get root, then you put your program push to / system / app directory, try to listen to unlock screen broadcast USER_PRESENT
No comments:
Post a Comment