notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE); Notification notification = new Notification(
android.R.drawable.stat_notify_chat, "Hello",
System.currentTimeMillis()); Intent notificationIntent = new Intent(MyNotification.this,
SendActivity.class); System.out.println("xy="+xy);
notificationIntent.putExtra("xy", xy);
PendingIntent pIntent = PendingIntent.getActivity(
MyNotification.this, 0, notificationIntent, 0);
notification.setLatestEventInfo(MyNotification.this,
contentTitle, contentText + "**" + str, pIntent); System.out.println("Handler id=" + MyNotification.ID);
notificationManager.notify(MyNotification.ID, notification);
Activity中的代码 Intent intent=getIntent();
int kk=intent.getIntExtra("xy", 0);
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货