試圖根據用戶使用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
只是因爲一個錯誤無法運行此項目