In my app there is a service class and need to call an activity class from that service class,but it each time while calling the acti开发者_如何学编程vity class its show me a message that application is not responding ,and below is my code..
public class MyAlarmService_Movie extends Service {
@Override
public void onCreate() {
super.onStart(intent, startId);
Intent in=new Intent().setClass(MyAlarmService.this,Reminder.class);
startActivity(in);
}
}
Give in.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
before starting the intent.
精彩评论