Description:
Returns information about the system on which the application is running.
Syntax:
system.getInfo( parm )
Example:
print( system.getInfo( "deviceID" ) ) -- display the deviceID
Parameters:
parm
The first argument param is a string that determines what is returned.
Valid values for param:
“name” returns the human readable model name. On iPhone, this would be the name of the phone as it appears in iTunes, e.g. “Steve’s iPhone”.
“model” returns the device model (as specified by the manufacturer). These include:
“iPhone”
“iPad”
“iPhone Simulator”
“iPad Simulator”
“Nexus One”
“Droid”
“Galaxy Tab”
Note: The above is a list of all the iOS models and the Android devices used in the Corona Simulator. Most Android devices return a model number instead of a model name.
“deviceID” returns the unique id of the device, e.g. IMEI or similar number.
“environment” returns the environment that the app is running in. These include:
“simulator” the Corona Simulator
“device” iOS, Android device and Xcode Simulator
“platformName” returns the platform name (the OS name), i.e. one of the following:
“Mac OS X” (Corona Simulator on Mac)
“Win” (Corona Simulator on Windows)
“iPhone OS” (all iOS devices and Xcode Simulator)
“Android” (all Android devices)
“platformVersion” returns a string representation of the platform version. This is sometimes, but not always, a number — for example a Droid X is currently returning “2.1-update1″.
“version” This is deprecated. Use “build” instead to distinguish between different Corona build versions.
“build” returns the Corona build string as it appears in the About box of the Corona Simulator.
“textureMemoryUsed” returns the texture memory usage (in bytes). Texture memory (for graphics/images) tends to be the most sharply limited resource in mobile development, since it runs out before normal memory.
“maxTextureSize” returns the maximum texture width or height supported by the device. (Available starting from Build 2011.310)
“architectureInfo” returns a string describing the underlying CPU architecture of the device you are running on. This API is mostly for internal debugging but may have uses. Strings may be subject to changes in the future depending on the changing landscape of devices and CPUs. (Available starting from Build 2011.326).
Android on ARM devices will return “ARM” (typically for ARMv6) or “ARM Neon” (ARMv7). iOS will return values such as: “iPhone1,1″, “iPhone1,2″, where mappings are:
“iPhone1,1″ = iPhone 1G
“iPhone1,2″ = iPhone 3G
“iPhone2,1″ = iPhone 3GS
“iPod1,1″ = iPod touch 1G
“iPod2,1″ = iPod touch 2G
Mac may return i386, x86_64, ppc, or ppc64. (Currently only i386 is available.)
Windows is currently unsupported.
Returns:
String of parameter requested.
Remarks:
“maxTextureSize” available in Build 2011.310
“architectureInfo” available in Build 2011.326
Supported on operating systems and platforms for build numbers shown:
Mac OS X:Corona SDK 2.0
Windows: Corona SDK 2.0
iOS: Corona SDK 2.0
Android: Corona SDK 2.0