Wednesday, February 12, 2014

Help Andrews back to the main screen in service, the call is disconnected, why ah


            
There is a radio receiver, after receiving the order, call the service in the gohome back to the main screen, if a call, the call will be disconnected, this should be how to solve?
public static void gohome (final Context context) {
new Thread (new Runnable () {
@ Override
public void run () {
Intent hd = new Intent ();
hd.setAction (Intent.ACTION_MAIN);
hd.addCategory (Intent.CATEGORY_HOME);
hd.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity (hd);
}
.}) Start ();
}
Reply:
Would you? ? ? ?

No comments:

Post a Comment