1
的Android如何将数据传递到多个通知,明确当点击它
多个数据传递到通知 当我通知点击它只能打开最近
final Notification notifyDetails = new Notification(R.drawable.e4,"temp",System.currentTimeMillis());
long[] vibrate = {100,100,200,300};
notifyDetails.vibrate = vibrate;
notifyDetails.defaults =Notification.DEFAULT_ALL;
Context context = getApplicationContext();
CharSequence contentTitle = "hello"
CharSequence contentText = "You have a notification" ;
Intent notifyIntent = new Intent(context, Send_Notification_Act.class);
notifyIntent.putExtra("name", "sunil");
notifyIntent.putExtra("ID", SIMPLE_NOTFICATION_ID);
PendingIntent intent =
PendingIntent.getActivity(Back_Reciver.this, 0,
notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
notifyDetails.setLatestEventInfo(context, contentTitle, contentText, intent);