Skip to content

Commit

Permalink
add new code in notification
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangqinghe committed Mar 19, 2015
1 parent a314af9 commit 1eb4354
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Plugins/Android/src/MyReceiver.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,11 @@ public void onReceive(Context context, Intent intent) {
Log.d(TAG, "[MyReceiver] 用户点击打开了通知");
JPushInterface.reportNotificationOpened(context, bundle.getString(JPushInterface.EXTRA_MSG_ID));

Intent launch = context.getPackageManager().getLaunchIntentForPackage(context.getPackageName());
launch.addCategory(Intent.CATEGORY_LAUNCHER);
launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK|Intent.FLAG_ACTIVITY_SINGLE_TOP);
context.startActivity(launch);

//把数据打包,交给用户自己处理
if(!JPushBridge.ISQUIT) {
Log.d(TAG, "coming in---------no quit");
Expand Down

0 comments on commit 1eb4354

Please sign in to comment.