2017-02-21 67 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(); 
    } 

}