CrossProfileApps.CanInteractAcrossProfiles 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
回傳呼叫套件是否能跨設定檔互動。
[Android.Runtime.Register("canInteractAcrossProfiles", "()Z", "GetCanInteractAcrossProfilesHandler", ApiSince=30)]
public virtual bool CanInteractAcrossProfiles();
[<Android.Runtime.Register("canInteractAcrossProfiles", "()Z", "GetCanInteractAcrossProfilesHandler", ApiSince=30)>]
abstract member CanInteractAcrossProfiles : unit -> bool
override this.CanInteractAcrossProfiles : unit -> bool
傳回
如果呼叫的套件能跨設定檔互動,則為真。
- 屬性
備註
回傳呼叫套件是否能跨設定檔互動。
具體來說, 回傳以下條件是否全部成立: <ul><li>#getTargetUserProfiles() 回傳呼叫使用者的非空清單。</li><li>使用者先前已同意對呼叫套件進行交叉配置通訊。</li><li>呼叫套件要麼被 OEM 預設允許列表,要麼是管理員透過 android.app.admin.DevicePolicyManager#setCrossProfilePackages(ComponentName, Set).
</li></ul>
若 false,則可用 檢查 #canRequestInteractAcrossProfiles()套件目前請求用戶同意以跨設定檔互動的能力。 若 true,則可透過 取得用戶同意。#createRequestInteractAcrossProfilesIntent() 該套件接著可以收聽 #ACTION_CAN_INTERACT_ACROSS_PROFILES_CHANGED 廣播。
Java 文件 android.content.pm.CrossProfileApps.canInteractAcrossProfiles()。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。