native.getProperty()

Type Function
Library native.*
Revision 2017.3060
Keywords native property
See also native.setProperty()

Overview

Gets the value of a platform-specific property.

Syntax

native.getProperty( key )
key (required)

String. The property whose value will be retrieved. Supported keys include:

  • "androidSystemUiVisibility" — Android and Fire OS only.
  • "applicationIconBadgeNumber" — iOS only.
  • "applicationSupportsShakeToEdit" — iOS only.
  • "networkActivityIndicatorVisible" — iOS only.
  • "windowMode" — Applies only to macOS desktop and Win32 desktop apps.
  • "windowTitleText" — Applies only to macOS desktop and Win32 desktop apps.
  • "mouseCursorVisible" — Applies only to macOS desktop and Win32 desktop apps.

Example

local badge_num = native.getProperty( "applicationIconBadgeNumber" )
badge_num = badge_num + 1

native.setProperty( "applicationIconBadgeNumber", badge_num )