2017-02-21 8 views

答えて

1

以下のutilクラスを使用して、デバイスIDとロケールを取得できます。

public class DeviceInfoUtil { 

    public static String getDeviceId(Context context){ 
     return Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID); 
    } 
    public static String getDeviceLocale(){ 
     return Locale.getDefault().getLanguage(); 
    } 

} 
関連する問題