Difference between revisions of "Application"
(dirty example to put in its own page!) |
(typo in code) |
||
Line 14: | Line 14: | ||
-- Request permission | -- Request permission | ||
if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then | if not application:checkPermission("android.permission.WRITE_EXTERNAL_STORAGE") then | ||
− | application: | + | application:requestPermissions({"android.permission.WRITE_EXTERNAL_STORAGE"}) -- note the plural in "requestPermissions" |
end | end | ||
</source> | </source> |
Revision as of 20:43, 29 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:requestPermissions({"android.permission.WRITE_EXTERNAL_STORAGE"}) -- note the plural in "requestPermissions"
end
MethodsApplication:canOpenUrl Tests if it is possible to open provided url |
EventsEvent.APPLICATION_START ConstantsApplication.LANDSCAPE_LEFT |