Moai SDK  2.0
MOAIAppAndroid Class Reference
+ Inheritance diagram for MOAIAppAndroid:

Function List

getUTCTime
 
getStatusBarHeight
 
getSystemUptime
 
sendMail
 
share
 

Additional Inherited Members

- Function List inherited from MOAIGlobalEventSource
template<typename TYPE >
getListener
 
template<typename TYPE >
setListener
 

Detailed Description

ConstantsDescription
MOAIAppAndroid.SESSION_START Event code indicating the beginning of an app session.
MOAIAppAndroid.SESSION_END Event code indicating the end of an app sessions.
MOAIAppAndroid.BACK_BUTTON_PRESSED Event code indicating that the physical device back button was pressed.

Function Documentation

getStatusBarHeight

Gets the Height of an Android 3.x status bar.


function getStatusBarHeight ()

Returns
number height
getSystemUptime

Returns device uptime in seconds.


function getSystemUptime ()

Returns
number uptime
getUTCTime

Gets the UTC time.


function getUTCTime ()

Returns
number time
sendMail

Send a mail with the passed in default values.


function sendMail ( string recipient, string subject, string message )

Parameters
stringrecipient
stringsubject
stringmessage
Returns
nil
share

Open a generic Android dialog to allow the user to share via email, SMS, Facebook, Twitter, etc.


function share ( string prompt, string subject, string text )

Parameters
stringprompt The prompt to show the user.
stringsubject The subject of the message to share.
stringtext The text of the message to share.
Returns
nil