【发布时间】:2017-02-12 23:55:20
【问题描述】:
对于我的应用,我需要在不同的时间发出不同的通知。假设我在上午 11 点、上午 12 点、下午 1 点设置了一个通知,所以一个 bt 它只给出最后一个。我使用了下面的代码
Intent intent = new Intent(context, MediaActivity.class);
RQS = (int) System.currentTimeMillis();
PendingIntent pIntent = PendingIntent.getActivity(context, RQS, intent,
PendingIntent.FLAG_UPDATE_CURRENT);
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(1, mBuilder.build());
我已经声明 private int RQS_1;在 MainActivity 我该如何解决?
【问题讨论】:
-
欢迎来到stackoverflow。您的问题标题没有描述您的问题,并且问题含糊不清且写得不好。在改进您的问题之前,请参考How do I ask a good question? FAQ。
标签: android notifications broadcastreceiver