Difference between revisions of "Application"
(dirty example to put in its own page!) |
|||
Line 8: | Line 8: | ||
=== <translate>Description</translate> === | === <translate>Description</translate> === | ||
The Application class contains the common functions that are available to the current application. There is a global variable ''application'' of type Application to access these functions. | The Application class contains the common functions that are available to the current application. There is a global variable ''application'' of type Application to access these functions. | ||
+ | |||
+ | |||
+ | I add a quick example here but it would need its own page! '''(TO DO)''' | ||
+ | <source lang="lua"> | ||
+ | -- Request permission | ||
+ | if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then | ||
+ | application:requestPermission({"android.permission.WRITE_EXTERNAL_STORAGE"}) | ||
+ | end | ||
+ | </source> | ||
+ | |||
{|- | {|- |
Revision as of 04:13, 27 June 2020
Supported platforms:
Available since: Gideros 2011.6
Inherits from: Object
Description
The Application class contains the common functions that are available to the current application. There is a global variable application of type Application to access these functions.
I add a quick example here but it would need its own page! (TO DO)
-- Request permission
if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then
application:requestPermission({"android.permission.WRITE_EXTERNAL_STORAGE"})
end
MethodsApplication:canOpenUrl Tests if it is possible to open provided url |
EventsEvent.APPLICATION_START ConstantsApplication.LANDSCAPE_LEFT |