7.7. System Information

The sysinfo module offers an API for checking the system information of the mobile device. The following functions are provided:

  • battery() returns the current battery level ranging from 0 to 7. If using an emulator, value 0 is always returned.

  • imei () returns the IMEI of the device as a Unicode string. If using an emulator, the hardcoded string u"000000000000000" is returned.

  • active_profile() returns the current active profile as a string, which can be one of the following: 'general', 'silent', 'meeting', 'outdoor', 'pager', 'offline', 'drive', or 'user <profile value>'.

  • display_pixels() returns the width and height of the display in pixels.

  • display_twips() returns the width and height of the display in twips (screen-independent units to ensure that the proportion of screen elements are the same on all display systems). A twip is defined as 1/1440 of an inch, or 1/567 of a centimeter.

  • free_drivespace() returns the amount of free space left on the drives in bytes.

  • max_ramdrive_size() returns the maximum size of the RAM drive on the device.

  • total_ram() returns the amount of RAM memory on the device.

  • free_ram() returns the amount of free RAM memory available on the device.

  • total_rom() returns the amount of read-only ROM memory on the device.

  • ring_type() returns the current ringing type as a string, which can be one of the following: 'normal', 'ascending', 'ring_once', 'beep', or 'silent'.

  • os_version() returns the operating system version number of the device.

  • signal_bars() ...

Get Mobile Python: Rapid Prototyping of Applications on the Mobile Platform now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.