Notification.Builder.SetContentIntent(PendingIntent) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
請提供一個待定意圖,當通知被點擊時發送。
[Android.Runtime.Register("setContentIntent", "(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;", "GetSetContentIntent_Landroid_app_PendingIntent_Handler")]
public virtual Android.App.Notification.Builder SetContentIntent(Android.App.PendingIntent? intent);
[<Android.Runtime.Register("setContentIntent", "(Landroid/app/PendingIntent;)Landroid/app/Notification$Builder;", "GetSetContentIntent_Landroid_app_PendingIntent_Handler")>]
abstract member SetContentIntent : Android.App.PendingIntent -> Android.App.Notification.Builder
override this.SetContentIntent : Android.App.PendingIntent -> Android.App.Notification.Builder
參數
- intent
- PendingIntent
待定意圖
傳回
這個 Android.App.Notification.Builder 實例,允許通話串接。
- 屬性
備註
請提供一個待定意圖,當通知被點擊時發送。 Android Build.VERSION_CODES。S,針對 API 層級Build.VERSION_CODES的應用程式。S 級以上的用戶在處理廣播接收器或服務時,無法啟動通知點擊的活動。 在這些情況下,要啟動活動,請為該活動本身提供待定意圖(PendingIntent)。 截至Build.VERSION_CODES年。HONEYCOMB,如果這個欄位是未設定的,且你已經用 setContent(RemoteViews)設定了自訂的 RemoteViews,你可以使用 RemoteViews.setOnClickPendingIntent(int,PendingIntent)來為該自訂版面中的各個視圖指派 PendingIntents(也就是在通知視圖內建立可點擊按鈕)。
另請參閱:
Android 參考資料。android.app.Notification.Builder.setContentIntent
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。