語言

Settings.Secure.GetLong 方法

定義

多載

名稱 Description
GetLong(ContentResolver, String)

方便函數,用於取得單一安全設定值。long

GetLong(ContentResolver, String, Int64)

方便函數,用於取得單一安全設定值。long

GetLong(ContentResolver, String)

方便函數,用於取得單一安全設定值。long

[Android.Runtime.Register("getLong", "(Landroid/content/ContentResolver;Ljava/lang/String;)J", "")]
public static long GetLong(Android.Content.ContentResolver? cr, string? name);
[<Android.Runtime.Register("getLong", "(Landroid/content/ContentResolver;Ljava/lang/String;)J", "")>]
static member GetLong : Android.Content.ContentResolver * string -> int64

參數

cr
ContentResolver

存取 ContentResolver。

name
String

要取回的設定名稱。

傳回

設定的當前數值。

屬性

例外狀況

如果找不到以名字命名為基準的設定,或設定值不是整數,則會拋出。

備註

方便函數,用於取得單一安全設定值。long 請注意,內部設定的值總是以字串形式儲存;這個函式會幫你把字串轉換成 A long 。

此版本不採用預設值。 如果設定尚未設定,或字串值不是數字,則會拋 SettingNotFoundException出 。

Java 文件 android.provider.Settings.Secure.getLong(android.content.ContentResolver, java.lang.String)。

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

適用於

GetLong(ContentResolver, String, Int64)

方便函數,用於取得單一安全設定值。long

[Android.Runtime.Register("getLong", "(Landroid/content/ContentResolver;Ljava/lang/String;J)J", "")]
public static long GetLong(Android.Content.ContentResolver? cr, string? name, long def);
[<Android.Runtime.Register("getLong", "(Landroid/content/ContentResolver;Ljava/lang/String;J)J", "")>]
static member GetLong : Android.Content.ContentResolver * string * int64 -> int64

參數

cr
ContentResolver

存取 ContentResolver。

name
String

要取回的設定名稱。

def
Int64

若設定未定義,則回傳該值。

傳回

設定的當前值,或若未定義或不有效 long,則為「def」。

屬性

備註

方便函數,用於取得單一安全設定值。long 請注意,內部設定的值總是以字串形式儲存;這個函式會幫你把字串轉換成 A long 。 如果設定未定義或不是 long。

Java 文件 android.provider.Settings.Secure.getLong(android.content.ContentResolver, java.lang.String, long)。

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

適用於