1
當用戶按下推送通知時,有沒有辦法獲得點擊事件?獲取推送通知點擊事件
我的問題是,在我的一些通知中,我打開瀏覽器,所以我不能添加額外的處理點擊事件的意圖。
可以處理:
Intent QuestionIntent = new Intent(this, ActivityQuestionnaires.class);
QuestionIntent.putExtra("pushFlag", true);
contentIntent = PendingIntent.getActivity(this, 0, QuestionIntent, PendingIntent.FLAG_UPDATE_CURRENT);
不能處理:
contentIntent = PendingIntent.getActivity(this, 0,
new Intent(Intent.ACTION_VIEW, Uri.parse(data)), PendingIntent.FLAG_UPDATE_CURRENT);
感謝, 宜蘭
爲什麼不將您的意圖傳遞給您的應用程序,然後獲取onclick事件,然後從您的應用程序(或您的應用程序中的服務)打開瀏覽器, – AnixPasBesoin