Friday, February 14, 2014

android 4.0 how to turn the situation in the absence of activity since the launch of the service, very anxious. . .


I wanted to write a Service, do not want Activity, no interface, boot receive the broadcast starts. .
Internet to find a few ways:

First, write a very simple procedure, it is an Activity, refers to this Activity title bar to remove the background transparent, then this will finish himself Activity's OnCreate () away, without doing anything, as long as stated in the Manifest.xml Power service is OK, then switched services in response to this internal procedures.

Second, do not Activity, and direct the program written in a Widgets ...... (that do not know)

Third, the system-level applications can be received boot broadcasting. (I verified different too)


I hope to achieve a third request colleagues to help. . .<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
No activity may be a matter of course
  





 / ** 
* @ Author coolszy
* @ Date 2011-6-14
* @ Blog http://blog.csdn.net/coolszy
* /

public class BootCompletedReceiver extends BroadcastReceiver
{

@ Override
public void onReceive (Context context, Intent intent)
{
Log.i ("MainActivity", "boot completed");
}
}


  

Reply:
Which started broadcasting service on the line
Reply:
reference to the second floor guoyoulei520 reply:
which started broadcasting service on the line
Do you have to start over in the 4.0 environment?
Reply:
reference to the third floor jjhaowei reply:
Quote: references to the second floor guoyoulei520 reply:

Which started broadcasting service on the line
Do you have to start over in the 4.0 environment?
Oh, 4.0 seems to be changed
Reply:
references, 4th Floor guoyoulei520 reply:
Quote: references to the third floor jjhaowei reply:

Quote: references to the second floor guoyoulei520 reply:

Which started broadcasting service on the line
Do you have to start over in the 4.0 environment?
Oh, 4.0 seems to be changed
Yes, but thank you.
Reply:
http://www.eoeandroid.com/thread-263042-1-1.html hope for your help
Reply:
tmd, with system-level testing, yesterday can be successful. Today to see service class naming is not standardized, it took a long name. Unexpected problem arises at this length. Naming said to have a limited length. Oh, and a waste of a morning. .
Reply:
Will the landlord seeking advice how to achieve
Reply:
reference to the 8th floor butong350 reply:
ask the landlord how to achieve seek advice
This is in my root privileges oh. Press this to http://www.eoeandroid.com/thread-263042-1-1.html, there are questions you can ask me
Reply:
reference to the 6th floor syl7752 reply:
http://www.eoeandroid.com/thread-263042-1-1.html hope for your help
Thank you, I follow you get.
Reply:
references, 5th Floor jjhaowei reply:
Quote: references to the 4th floor guoyoulei520 reply:

Quote: references to the third floor jjhaowei reply:

Quote: references to the second floor guoyoulei520 reply:

Which started broadcasting service on the line
Do you have to start over in the 4.0 environment?
Oh, 4.0 seems to be changed
Yes, but thank you.


That is in the 4.0 environment, said the second floor is not feasible? ? ?
Reply:
Yes, the second floor is not feasible, while the above said method also allowed to system-level signature, not his own rom how can this signature ah, ha ha ha, honest added activity it
Reply:
reference to the 11th floor f839903061 reply:
Quote: references, 5th Floor jjhaowei reply:

Quote: references to the 4th floor guoyoulei520 reply:

Quote: references to the third floor jjhaowei reply:

Quote: references to the second floor guoyoulei520 reply:

Which started broadcasting service on the line
Do you have to start over in the 4.0 environment?
Oh, 4.0 seems to be changed
Yes, but thank you.


That is in the 4.0 environment, said the second floor is not feasible? ? ?
ah, need activity.
Reply:
Will the landlord with this post http://www.eoeandroid.com/thread-263042-1-1.html
The first of several programs to address the problem ah.

No comments:

Post a Comment