在广播来启动Activity的时候如果不设置intent的FLAG_ACTIVITY_NEW_TASK属性,就会报这个异常:
android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag.
就是说在activity上下文之外调用startActivity需要FLAG_ACTIVITY_NEW_TASK属性。new task 是新启了一个acvitiy栈
详细讲解:https://blog.csdn.net/dct8888/article/details/52064160