import android.content.Context
import android.os.Build
import android.provider.Settings
import java.util.*
object MobileDevicesInfoUtils {
fun getManufacturer(): String {
return Build.MANUFACTURER
}
fun getModel(): String {
return Build.MODEL
}
fun getCurrentLanguage(): String {
return Locale.getDefault().language
}
fun getSystemVersion(): String {
return Build.VERSION.RELEASE
}
fun getLanguageList(context: Context): List<Locale> {
val localeList = mutableListOf<Locale>()
val locales = context.resources.configuration.locales
for (i in 0 until locales.size()) {
localeList.add(locales[i])
}
return localeList
}
fun getPhoneDeviceId(context: Context): String {
val contentResolver = context.contentResolver
return Settings.Secure.getString(contentResolver, Settings.Secure.ANDROID_ID)
}
}