2
我面臨一些待處理意圖的問題。我使用通知管理器設置了一些待定內容。這些通知在用戶點擊它們時啓動一項活動。我在待決意圖中使用了Intent。這可以通知點擊確定。Android:如何從其他活動推出待定意圖?
Notification notification = new Notification(icon, tickerText, when);
Context context = getApplicationContext();
Intent intentOptionDialog = new Intent(Safety_Check_Service.this, Dialog_Safety_Check.class);
intentOptionDialog.putExtra("startID",startId);
intentOptionDialog.putExtra("CheckInID", CheckInId);
intentOptionDialog.putExtra("Frequency", Frequency);
intentOptionDialog.putExtra("flagFirstShedule", true);
stopID = (startId + 17);
intentOptionDialog.putExtra("stopID", stopID);
PendingIntent contentIntent = PendingIntent.getActivity(Safety_Check_Service.this, DIALOG_ID, intentOptionDialog, 0);
但我的問題是,我想從其他活動啓動這些掛起的意圖。等待的意圖被創建。我如何能從其他活動中獲得這些未決意圖,以及如何獲得設置有未決意圖的附加功能?
請幫幫我。
看到這篇文章http://iserveandroid.blogspot.com/2011/03/how-to-launch-pending-intent.html – 2012-04-18 05:16:56
我見過這個。但我沒有服務意圖的對象,我不能訪問它。我必須創造一個新的。 – 2012-04-18 05:57:15