2
保留中のインテントに関する問題に直面しています。通知マネージャを使用して保留中のインテントを設定しました。これらの通知は、ユーザがそれらをクリックするとアクティビティを開始します。私は保留中の意図で使用されたインテントをいくつか追加します。これは通知のクリックで正常に動作します。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 –
これを見ました。しかし、私はそれがアクセスできないサービスの保留中の目的のオブジェクトを持っていません。私は新しいものを作り出す必要があります。 –