Skip to content

DeviceUtils

Shanti Ranjan Das edited this page Jan 24, 2020 · 2 revisions
  • isRtlLayout()
    Returns true if the current layout direction is [View.LAYOUT_DIRECTION_RTL]

  • getRegionFromSimCard(context: Context): String
    Method to get Region based on SIM card i.e., it will return country region.

  • isSimPresentInDevice(context: Context): Boolean
    Returns true if sim card is present in your device.

  • isDeviceRooted(): Boolean
    Returns true if device is rooted else false.

  • getSDKVersionName(): String? = Build.VERSION.RELEASE
    Return the version name of device's system.

  • getSDKVersionCode()
    Return version code of device's system.

  • getMacAddress(context: Context): String
    Return the MAC address.

  • getMacAddress(context: Context, vararg excepts: String): String
    Return the MAC address.

  • getAndroidID(context: Context): String
    Return the android id of device. Make sure to get necessary permissions.

  • getManufacturer(): String?
    Get the manufacturer/hardware name of device.

  • getModel(): String
    Get Model no. of the device.

  • getABIs(): Array<String>
    Return an ordered list of ABIs supported by this device. The most preferred ABI is the first element in the list.

  • getHMac(data: String?, key: String): String?
    Computes RFC 2104-compliant HMAC signature. This can be used to sign the Amazon S3 request urls. It can throw SignatureException .

Clone this wiki locally