后台通知栏跳转不了
本帖最后由 breeze 于 2015-5-20 18:46 编辑
@Override
public Intent getLaunchIntent(EMMessage message) {
//设置点击通知栏跳转事件
Intent intent = new Intent(appContext, EaseChattingActivity.class);
intent.putExtra(EaseChatService.DST_USERNAME, message.getFrom());
return intent;
}程序运行后台时,我设置了通知栏跳转的activity,但是点击通知栏后没有跳转,什么原因
@Override
public Intent getLaunchIntent(EMMessage message) {
//设置点击通知栏跳转事件
Intent intent = new Intent(appContext, EaseChattingActivity.class);
intent.putExtra(EaseChatService.DST_USERNAME, message.getFrom());
return intent;
}程序运行后台时,我设置了通知栏跳转的activity,但是点击通知栏后没有跳转,什么原因
没有找到相关结果
已邀请:
3 个回复
breeze - 如:80后IT男..
百度一堆资料
已解决了,AndroidMainfest.xml中对应的exported=true就可以了
zhangnan
Added in API level 1
Retrieve a PendingIntent that will start a new activity, like calling Context.startActivity(Intent). Note that the activity will be started outside of the context of an existing activity, so you must use the Intent.FLAG_ACTIVITY_NEW_TASK launch flag in the Intent.
你的flag要设置成Intent.FLAG_ACTIVITY_NEW_TASK
zhangnan
public static PendingIntent getActivity (Context context, int requestCode, Intent intent, int flags ...
百度一堆资料
zhangnan
public static PendingIntent getActivity (Context context, int requestCode, Intent intent, int flags ...
百度一堆资料