Android 在Service里面启动Activity

直接在代码:

[java] view plain copy
print ?
  1. Intent dialogIntent = new Intent(getBaseContext(), YourActivity.class);   
  2. dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);   
  3. getApplication().startActivity(dialogIntent);   
Intent dialogIntent = new Intent(getBaseContext(), YourActivity.class); 
dialogIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
getApplication().startActivity(dialogIntent); 


 

 

你可能感兴趣的:(android)