Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
android中的多通知_Android - Fatal编程技术网

android中的多通知

android中的多通知,android,Android,我想创建提醒应用程序…我正在使用通知管理器。。。 我正在使用这一行作为通知的实例 long when=sdf.parse("09 06 2010 15:45:00"); Notification notifyDetails = new Notification(R.drawable.reminder_1,"Reminder",when.getTime()); 我需要在指定的时间启动通知…但这里是通知在我给出日期时立即启动…并且还帮助我显示多个通知当参数是通知条处于展开视图时显示的通知的时间时。

我想创建提醒应用程序…我正在使用通知管理器。。。 我正在使用这一行作为通知的实例

long when=sdf.parse("09 06 2010 15:45:00");
Notification notifyDetails = new Notification(R.drawable.reminder_1,"Reminder",when.getTime());

我需要在指定的时间启动通知…但这里是通知在我给出日期时立即启动…并且还帮助我显示多个通知

当参数是通知条处于展开视图时显示的通知的时间时。当显示
通知时,它不用于调度


如果要计划将来发生的事情,请尝试。

when
参数是通知栏处于展开视图时显示的通知时间。当显示
通知时,它不用于调度

如果你想安排将来发生的事情,试试这个

使用另一个“id”进行多次通知


使用另一个“id”进行多个通知…

确定我正在使用报警管理器…它将被安排…如果设备重新启动…报警活动能否正确处理该计划?确定我正在使用报警管理器…它将被安排…如果设备重新启动…报警活动能否正确处理该计划?
String ns = Context.NOTIFICATION_SERVICE;
        NotificationManager notificationManager = (NotificationManager) getSystemService(ns);
        int icon = R.drawable.update;
        CharSequence tickerText = "assignments";
        long when = System.currentTimeMillis();

        Notification assignmentNotification = new Notification(icon, tickerText, when);
        assignmentNotification.defaults |= Notification.DEFAULT_SOUND;
        long[] vibrate = {0,100,200,300};
        assignmentNotification.vibrate = vibrate;
        Context context = getApplicationContext();
        CharSequence contentTitle = "check assignments";
        CharSequence contentText = "chek ur app for assignments ";
        Intent notificationIntent = new Intent(context, ViewAssignmentnotificationActivity.class);
        PendingIntent contentIntent = PendingIntent.getActivity(context, 0, notificationIntent,0);
        assignmentNotification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
       ** final int id = 2;