BroadcastOptions.SetShareIdentityEnabled(Boolean) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
設定是否應將廣播應用程式的身份分享給所有接收此廣播的接收者。
[Android.Runtime.Register("setShareIdentityEnabled", "(Z)Landroid/app/BroadcastOptions;", "GetSetShareIdentityEnabled_ZHandler", ApiSince=34)]
public virtual Android.App.BroadcastOptions SetShareIdentityEnabled(bool shareIdentityEnabled);
[<Android.Runtime.Register("setShareIdentityEnabled", "(Z)Landroid/app/BroadcastOptions;", "GetSetShareIdentityEnabled_ZHandler", ApiSince=34)>]
abstract member SetShareIdentityEnabled : bool -> Android.App.BroadcastOptions
override this.SetShareIdentityEnabled : bool -> Android.App.BroadcastOptions
參數
- shareIdentityEnabled
- Boolean
是否應該將廣播應用程式的身份分享給接收者
傳回
this
BroadcastOptions 實例
- 屬性
備註
設定是否應將廣播應用程式的身份分享給所有接收此廣播的接收者。 當向需要知道廣播者身份的接收器廣播時,請使用此選項;當此值設為 true 時,接收端即可存取廣播應用程式的套件名稱與 UID。 如果沒有設定,預設為 false。
另請參閱:
Android 參考資料。android.app.BroadcastOptions.setShareIdentityEnabled
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。