Skip to content

Corona SDK device plugin - your one-stop shop for getting information about the device being used

Notifications You must be signed in to change notification settings

PelagicGames/plugins-device-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

device: Plugin API Docs

 
Type Library
Corona Store device
Keywords device, dpi, support
See also Sample code

Overview

The device plugin can be used in your Corona project. It enables you to easily get information about the device running the application in one place, including what events are supported.

With access to xdpi and ydpi information for the device it is also possible to create an application with fixed real size display objects (i.e. the same size on multiple device screens), or to run the application with a stretched display without stretching display objects (see xdpi/ydpi for more information).

Syntax

local device = require "plugin.device"

Functions

Properties

Project Configuration

Corona Store Activation

In order to use this plugin, you must activate the plugin at the Corona Store.

SDK

When you build using the Corona Simulator, the server automatically takes care of integrating the plugin into your project.

All you need to do is add an entry into a plugins table of your build.settings. The following is an example of a minimal build.settings file:

settings =
{
	plugins =
	{
		-- key is the name passed to Lua's 'require()'
		["plugin.device"] =
		{
			-- required
			publisherId = "com.pelagic-games",
		},
	},		
}

Enterprise

If you have activated this plugin, you can download this plugin from the corresponding plugin page in the Corona Store.

Platform-specific Notes

Not supported with Corona Cards, as the device information will not be directly accessible to the library.

Some properties are only supported on Android and iOS, but may work on other platforms. In particular, xdpi and ydpi are only expected to work on Android and iOS.

Resources

Sample Code

You can access sample code here.

Support

More support is available from the Pelagic Games team:

Compatibility

Platform Supported
iOS Yes
Android Yes
Android (GameStick) Yes
Android (Kindle) Yes
Android (NOOK) Yes
Android (Ouya) Yes
Mac App Partial
Win32 App Partial
Windows Phone 8 Partial
Corona Simulator (Mac) Partial
Corona Simulator (Win) Partial

About

Corona SDK device plugin - your one-stop shop for getting information about the device being used

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages