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 activity 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With