startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW flag
2011-08-15 12:45
513 查看
startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW flag,is this really what you want?
在制作闹钟,复写BroadcastReceiver的onrecieve时,用Intent intent 连接AlartDialog时出现了以上问题
@Override
public void onReceive(Context arg0, Intent arg1) {
System.out.print("CallAlarm");
Intent intent = new Intent(arg0,AlarmAlert.class);
arg0.startActivity(intent);
}
添加intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
在制作闹钟,复写BroadcastReceiver的onrecieve时,用Intent intent 连接AlartDialog时出现了以上问题
@Override
public void onReceive(Context arg0, Intent arg1) {
System.out.print("CallAlarm");
Intent intent = new Intent(arg0,AlarmAlert.class);
arg0.startActivity(intent);
}
添加intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
相关文章推荐
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK fla
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK fla
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK fla
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- android.util.AndroidRuntimeException Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? com.uethinking.microvideo.manag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW _TASK flag.
- startActivity时报错Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag
- AndroidRuntimeException “Calling startActivity() from outside of an Activity context requires the FL
- startActivity时报错Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVI
- startActivity时报错Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVI
- Calling startActivity() from outside of an Activity context requires the FLA
- startActivity时报错Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVI
- startActivity时报错Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVI