語言

VirtualDevice.PersistentDeviceId 屬性

定義

回傳該虛擬裝置的持久識別碼(若有)。

public string? PersistentDeviceId { [Android.Runtime.Register("getPersistentDeviceId", "()Ljava/lang/String;", "", ApiSince=35)] get; }
[<get: Android.Runtime.Register("getPersistentDeviceId", "()Ljava/lang/String;", "", ApiSince=35)>]
member this.PersistentDeviceId : string

屬性值

屬性

備註

回傳該虛擬裝置的持久識別碼(若有)。

若此虛擬裝置沒有穩定識別碼,則回傳 null。

此識別碼可能對應實體裝置。 在這種情況下,只要該實體裝置與主機裝置相關聯,該裝置就會有效,且可用於每個裝置持續保存資料。

若同一實體裝置對應多個虛擬裝置,此識別碼可能在虛擬裝置間不具唯一性。

Java 文件 android.companion.virtual.VirtualDevice.getPersistentDeviceId()。

本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。

適用於