试图根据用户使用phonegap android设置使用科尔多瓦2.2.0设置的日期和时间提醒或提醒有从这里下载phonegap localnotification插件: phonegap android localnotification plugin 我刚刚达到其初始阶段,并获得此行的错误文件命名为:ALARMRECEIVER.JAVA:phonenot android localnotification?
// Construct the notification and notificationManager objects
final NotificationManager notificationMgr = (NotificationManager) systemService;
final Notification notification = new Notification(R.drawable.ic_launcher, tickerText,
System.currentTimeMillis());
final PendingIntent contentIntent = PendingIntent.getActivity(context, 0, new Intent(), 0);
notification.defaults |= Notification.DEFAULT_SOUND;
notification.vibrate = new long[] { 0, 100, 200, 300 };
notification.setLatestEventInfo(context, notificationTitle, notificationSubText, contentIntent);
/*
* If you want all reminders to stay in the notification bar, you should
* generate a random ID. If you want do replace an existing
* notification, make sure the ID below matches the ID that you store in
* the alarm intent.
*/
notificationMgr.notify(notificationId, notification);
误差只有这一行:
final Notification notification = new Notification(R.drawable.ic_launcher, tickerText,
System.currentTimeMillis());
红色亮显显示我:
R cannot be resolved to a variable
只是因为一个错误无法运行此项目