NFC APIs

NFC Message Beam APIs

AndroidHelper.dialogCreateNFCBeamMaster()

Description: Create a dialog which can send the message to NFC Beam Slave

Result : QPython NFC json result

AndroidHelper.NFCBeamMessage(message)

Description: Sendthe message to NFC Beam Slave without dialog

Result :  QPython NFC json result

AndroidHelper.dialogCreateNFCBeamSlave()

Description: Create a NFC Beam Slave to wait for the master's beam message

Result :  QPython NFC json result

QPython NFC json result

{
"role": <role>, # could be self/master/slave
"stat": <stat>, # could be ok / fail / cancl
"message": <message get> 
}

Location API

androidhelper.getLastKnownLocation

Droid = androidhelper.Android()
location = Droid.getLastKnownLocation().result
location = location.get('network', location.get('gps'))

Sensor API

androidhelper.sensorsReadOrientation

Droid = androidhelper.Android()
Droid.startSensingTimed(1, 250)
sensor = Droid.sensorsReadOrientation().result
Droid.stopSensing()

Other SL4A APIs

AndroidHelper.dialogCreateSpinnerProgress(title,message,maximum progress)

Description: Create a spinner progress dialog

AndroidHelper.webViewShow(url,wait)

url (String): URL
wait (Boolean,Optional): block until the user exits the WebView

Description: Display a WebView with the given URL.

http://code.google.com/p/android-scripting/wiki/UsingWebView