| |
- _Facade(__builtin__.object)
-
- Battery
- Bluetooth
- Camera
- Class
- Contact
- Event
-
- Broadcast
- Intent
- Location
- Misc
- Package
- Phone
- PhoneState
- Player
- Preference
- Recorder
- Sensing
- Signal
- Sim
- Sms
- Uri
- WakeLock
- Wifi
- __builtin__.object
-
- Count
class Battery(_Facade) |
|
Wrapper functions for BatteryManagerFacade
(http://www.mithril.com.au/android/doc/BatteryManagerFacade.html) |
|
- Method resolution order:
- Battery
- _Facade
- __builtin__.object
Methods defined here:
- __del__(self)
- __init__(self)
- health(self)
- Returns the most recently received battery health data
- level(self)
- Returns the most recently received battery level (percentage)
Min SDK level=5
- plugType(self)
- Returns the most recently received plug type data
- present(self)
- Returns the most recently received battery presence data
Min SDK level=5
- read(self)
- Returns the most recently recorded battery data
- status(self)
- Returns the most recently received battery status data
- technology(self)
- Returns the most recently received battery technology data
Min SDK level=5
- temperature(self)
- Returns the most recently received battery temperature
Min SDK level=5
- voltage(self)
- Returns the most recently received battery voltage
Min SDK level=5
Data and other attributes defined here:
- HEALTH = ('invaild', 'unknown', 'good', 'overheat', 'dead', 'over voltage', 'unspecified failure')
- PLUG_TYPE = ('unplugged', 'AC charger', 'USB port', 'unknown')
- STATUS = ('invalid', 'unknown', 'charging', 'discharging', 'not charging', 'full')
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Bluetooth(_Facade) |
|
Wrapper functions for BluetoothFacade
(http://www.mithril.com.au/android/doc/BluetoothFacade.html) |
|
- Method resolution order:
- Bluetooth
- _Facade
- __builtin__.object
Methods defined here:
- __init__(self, conn='')
- accept(self, timeout=30000, uuid='457807c0-4897-11df-9879-0800200c9a66')
- Listens for and accepts a Bluetooth connection. Blocks until the connection is established or fails
uuid (String) (default=457807c0-4897-11df-9879-0800200c9a66)
timeout (Integer) How long to wait for a new connection, in millseconds
- connect(self, address=None, uuid='457807c0-4897-11df-9879-0800200c9a66')
- Connect to a device over Bluetooth. Blocks until the connection is established or fails
uuid (String) The UUID passed here must match the UUID used by the server device.
- name(self)
- Returns the name of the connected device
- read(self, buffer=4096)
- Read up to bufferSize ASCII characters
- readbin(self, buffer=4096)
- Read up to bufferSize Binary bytes
- readline(self)
- Read the next line
- ready(self)
- Returns True if the next read is guaranteed not to block
- stop(self)
- Stops Bluetooth connection
- write(self, data)
- Sends ASCII characters over the currently open Bluetooth connection
- writebin(self, data)
- Send bytes over the currently open Bluetooth connection
Class methods defined here:
- address(cls) from __builtin__.type
- Returns the hardware address of the local Bluetooth adapter
- cancel(cls) from __builtin__.type
- Cancel the current device discovery process
- connections(cls) from __builtin__.type
- Returns active Bluetooth connections
- discover(cls, duration=None) from __builtin__.type
- Requests that the device be discoverable for Bluetooth connections
duration (Integer) period of time, in seconds, during which the device should be discoverable
- local(cls, name=None) from __builtin__.type
- Gets or Sets the Bluetooth Visible device name
name (String) New local name
- remote(cls, address) from __builtin__.type
- Queries a remote device for it's name or null if it can't be resolved
- scanMode(cls) from __builtin__.type
- Gets the scan mode for the local dongle
- start(cls) from __builtin__.type
- Start the remote device discovery process
- state(cls, enabled=None, prompt=True) from __builtin__.type
- Toggle Bluetooth on and off
prompt (Boolean) Prompt the user to confirm changing the Bluetooth state
Data and other attributes defined here:
- SCAN_MODE = ('non discoverable, non connectable', 'connectable, non discoverable', 'invaild scan mode', 'connectable, discoverable', 'Bluetooth is disabled')
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Broadcast(Event) |
| |
- Method resolution order:
- Broadcast
- Event
- _Facade
- __builtin__.object
Methods defined here:
- categories(self)
- Lists all the broadcast signals we are listening for
- reg = register(self, category, enqueue=True)
- register(self, category, enqueue=True)
- Registers a listener for a new broadcast signal
category (String)
enqueue (Boolean) Should this events be added to the event queue or only dispatched
- unreg = unregister(self, category)
- unregister(self, category)
- Stop listening for a broadcast signal
Methods inherited from Event:
- __init__(self, droid, **handler)
- clear(self)
- Clears all events from the event buffer
- loop(self)
- event hanlding loop
- poll(self, count=1)
- Returns and removes the oldest COUNT events
(i.e. location or sensor update, etc.) from the event buffer
- post(self, name, data, enqueue=False)
- Post an event to the event queue
name (String) Name of event
data (String) Data contained in event
enqueue (Boolean) Set to False if you don't want your events to be added to the event queue, just dispatched
- quit(self, data=None)
- quit event loop
there is a DATA parameter, so quit can be used as a event handler as well as a click handler or key handler
- wait(self, timeout=None)
- Blocks until an event occurs. The returned event is removed from the buffer
timeout (Integer) the maximum time to wait (in ms)
returns: (Event) Map of event properties
- waitFor(self, name, timeout=None)
- Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer
name (String)
timeout (Integer) the maximum time to wait (in ms)
returns: (Event) Map of event properties
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Class(_Facade) |
|
# java class is different from Android package |
|
- Method resolution order:
- Class
- _Facade
- __builtin__.object
Methods defined here:
- __init__(self, name)
- consts(self)
- Get list of constants (static final fields) for a class
- launch(self)
- Start activity with the given class name
Class methods defined here:
- launchable(cls) from __builtin__.type
- Returns a dict of all launchable application class names
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Count(__builtin__.object) |
|
reference count |
|
Methods defined here:
- __init__(self, init=0)
- clear(self)
- dec(self, value=1)
- dec_if_zero(self, callback, *args, **kwargs)
- dec the count first,
the check if count is zero, call the CALLBACK with ARGS and KWARGS
- get(self)
- inc(self, value=1)
- inc_if_zero(self, callback, *args, **kwargs)
- if count is zero, call the CALLBACK with ARGS and KWARGS
then inc the count
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Event(_Facade) |
|
Wrapper functions for EventFacade
(http://www.mithril.com.au/android/doc/EventFacade.html) |
|
- Method resolution order:
- Event
- _Facade
- __builtin__.object
Methods defined here:
- __init__(self, droid, **handler)
- clear(self)
- Clears all events from the event buffer
- loop(self)
- event hanlding loop
- poll(self, count=1)
- Returns and removes the oldest COUNT events
(i.e. location or sensor update, etc.) from the event buffer
- post(self, name, data, enqueue=False)
- Post an event to the event queue
name (String) Name of event
data (String) Data contained in event
enqueue (Boolean) Set to False if you don't want your events to be added to the event queue, just dispatched
- quit(self, data=None)
- quit event loop
there is a DATA parameter, so quit can be used as a event handler as well as a click handler or key handler
- reg = register(self, name, handler)
- register(self, name, handler)
- register event handler
NAME the event name
HANDLER should accept 1 param which contains event data
HANDLER should return True if the event is handled properly
- unreg = unregister(self, name)
- unregister(self, name)
- unregister event handler
NAME the event name
- wait(self, timeout=None)
- Blocks until an event occurs. The returned event is removed from the buffer
timeout (Integer) the maximum time to wait (in ms)
returns: (Event) Map of event properties
- waitFor(self, name, timeout=None)
- Blocks until an event with the supplied name occurs. The returned event is not removed from the buffer
name (String)
timeout (Integer) the maximum time to wait (in ms)
returns: (Event) Map of event properties
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Misc(_Facade) |
|
Wrapper functions for Misc Facade
(SpeechRecognitionFacade, TextToSpeechFacade, ToneGeneratorFacade, AndroidFacade) |
|
- Method resolution order:
- Misc
- _Facade
- __builtin__.object
Class methods defined here:
- barcode(cls) from __builtin__.type
- Starts the barcode scanner
- clipboard(cls, text=None) from __builtin__.type
- Read/Put text from/to the clipboard
- dtmf(cls, number, duration) from __builtin__.type
- Generate DTMF tones for the given phone number
number (String)
duration (Integer) duration of each tone in milliseconds (default=100)
- email(cls, to, subject, body, attach=None) from __builtin__.type
- Launches an activity that sends an e-mail message to a given recipient
- env(cls) from __builtin__.type
- A map of various useful environment details
- log(cls, msg) from __builtin__.type
- Writes message to logcat
- recognize(cls, prompt=None) from __builtin__.type
- Recognizes user's speech and returns the most likely result
- tts(cls, msg=None) from __builtin__.type
- Speaks the provided message via TTS
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Phone(_Facade) |
|
Wrapper functions for PhoneFacade and SettingsFacade
(http://www.mithril.com.au/android/doc/PhoneFacade.html) |
|
- Method resolution order:
- Phone
- _Facade
- __builtin__.object
Class methods defined here:
- airplane(cls, enabled=None) from __builtin__.type
- Toggles airplane mode on and off
- brightness(cls, bright=None) from __builtin__.type
- Gets or Sets the the screen backlight brightness
bright (Integer) brightness value between 0 and 255
- call(cls, uri) from __builtin__.type
- Calls a contact/phone number by URI
- cellLocation(cls) from __builtin__.type
- Returns the current cell location
- dial(cls, uri) from __builtin__.type
- Dials a contact/phone number by URI
- id(cls) from __builtin__.type
- Returns the unique device ID
for example, the IMEI for GSM and the MEID for CDMA phones.
Return null if device ID is not available
- maxVolume(cls) from __builtin__.type
- Returns the maximum ringer volume
- neighboring(cls) from __builtin__.type
- Returns the neighboring cell information of the device
- network(cls) from __builtin__.type
- Returns a the radio technology (network type) currently in use on the device
- number(cls) from __builtin__.type
- Returns the phone number string for line 1
for example, the MSISDN for a GSM phone
Return null if it is unavailable
- operator(cls) from __builtin__.type
- Returns the numeric name (MCC+MNC) of current registered operator
- operatorName(cls) from __builtin__.type
- Returns the alphabetic name of current registered operator
- roaming(cls) from __builtin__.type
- Returns true if the device is considered roaming on the current network, for GSM purposes
- screen(cls, timeout=None) from __builtin__.type
- Gets or Sets the screen timeout to this number of seconds
- silent(cls, enabled=None) from __builtin__.type
- Toggles ringer silent mode on and off
- subscriber(cls) from __builtin__.type
- Returns the unique subscriber ID
for example, the IMSI for a GSM phone
Return null if it is unavailable
- type(cls) from __builtin__.type
- Returns the device phone type
- version(cls) from __builtin__.type
- Returns the software version number for the device
for example, the IMEI/SV for GSM phones
Return null if the software version is not available
- vibrate(cls, enabled=None, ringer=True) from __builtin__.type
- Toggles vibrate mode on and off
If ringer=true then set Ringer setting, else set Notification setting
- voiceMailAlphaTag(cls) from __builtin__.type
- Retrieves the alphabetic identifier associated with the voice mail number
- voiceMailNumber(cls) from __builtin__.type
- Returns the voice mail number
Return null if it is unavailable
- volume(cls, volume=None) from __builtin__.type
- Gets or Sets the ringer volume
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Player(_Facade) |
|
Wrapper functions for MediaPlayerFacade
(http://www.mithril.com.au/android/doc/MediaPlayerFacade.html) |
|
- Method resolution order:
- Player
- _Facade
- __builtin__.object
Class methods defined here:
- close(cls, tag='default') from __builtin__.type
- Close media file
tag (String) string identifying resource (default=default)
returns: (boolean) true if successful
- info(cls, tag='default') from __builtin__.type
- Information on current media
tag (String) string identifying resource (default=default)
returns: (Map) Media Information
- list(cls, tag='default') from __builtin__.type
- Lists currently loaded media
returns: (Set) List of Media Tags
- loop(cls, enabled=True, tag='default') from __builtin__.type
- Set Looping
enabled (Boolean) (default=true)
tag (String) string identifying resource (default=default)
returns: (boolean) True if successful
- maxVolume(cls) from __builtin__.type
- Returns the maximum media volume
- pause(cls, tag='default') from __builtin__.type
- pause playing media file
tag (String) string identifying resource (default=default)
returns: (boolean) true if successful
- play(cls, url, tag='default', start=True) from __builtin__.type
- Open a media file
url (String) url of media resource
tag (String) string identifying resource (default=default)
start (Boolean) start playing immediately (default=true)
returns: (boolean) true if play successful
- playing(cls, tag='default') from __builtin__.type
- Checks if media file is playing
tag (String) string identifying resource (default=default)
returns: (boolean) true if playing
- seek(cls, msec, tag='default') from __builtin__.type
- Seek To Position
msec (Integer) Position in millseconds
tag (String) string identifying resource (default=default)
returns: (int) New Position (in ms)
- start(cls, tag='default') from __builtin__.type
- start playing media file
tag (String) string identifying resource (default=default)
returns: (boolean) true if successful
- volume(cls, volume=None) from __builtin__.type
- Gets or Sets the media volume
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Recorder(_Facade) |
|
Wrapper functions for MediaRecorderFacade
(http://www.mithril.com.au/android/doc/MediaRecorderFacade.html) |
|
- Method resolution order:
- Recorder
- _Facade
- __builtin__.object
Class methods defined here:
- audio(cls, path) from __builtin__.type
- Records audio from the microphone and saves it to the given location
path (String)
- capture(cls, path, audio=True) from __builtin__.type
- Records video (and optionally audio) from the camera and saves it to the given location
Duration specifies the maximum duration of the recording session
If duration is not provided this method will return immediately and the recording will only be stopped
when recorderStop is called or when a scripts exits
Otherwise it will block for the time period equal to the duration argument
path (String)
audio (Boolean) (default=true)
- interactive(cls, path) from __builtin__.type
- Starts the video capture application to record a video and saves it to the specified path
path (String)
- stop(cls) from __builtin__.type
- Stops a previously started recording
- video(cls, path, duration=0, size=1) from __builtin__.type
- Records video from the camera and saves it to the given location
Duration specifies the maximum duration of the recording session
If duration is 0 this method will return and the recording will only be stopped
when recorderStop is called or when a scripts exits
Otherwise it will block for the time period equal to the duration argument
size: 0=160x120, 1=320x240, 2=352x288, 3=640x480, 4=800x480
path (String)
duration (Integer) (default=0)
size (Integer) (default=1)
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Sensing(_Facade) |
|
Wrapper functions for SensorManagerFacade
(http://www.mithril.com.au/android/doc/SensorManagerFacade.html) |
|
- Method resolution order:
- Sensing
- _Facade
- __builtin__.object
Methods defined here:
- __del__(self)
- __init__(self, sensorNumber=1, delayTime=250)
- accelerometer(self)
- Returns the most recently received accelerometer values
returns: (List) a List of Floats [(acceleration on the) X axis, Y axis, Z axis]
- accuracy(self)
- Returns the most recently received accuracy value
- light(self)
- Returns the most recently received light value
- magnetometer(self)
- Returns the most recently received magnetic field values
returns: (List) a List of Floats [(magnetic field value for) X axis, Y axis, Z axis]
- orientation(self)
- Returns the most recently received orientation values
returns: (List) a List of Doubles [azimuth, pitch, roll]
- read(self)
- Returns the most recently recorded sensor data
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Sms(_Facade) |
|
Wrapper functions for SmsFacade
(http://www.mithril.com.au/android/doc/SmsFacade.html) |
|
- Method resolution order:
- Sms
- _Facade
- __builtin__.object
Class methods defined here:
- attrs(cls) from __builtin__.type
- Returns a List of all possible message attributes
- count(cls, unread=True, folder='inbox') from __builtin__.type
- Returns a List of all message IDs
- delete(cls, id) from __builtin__.type
- Deletes a message
- get(cls, id, *attrs) from __builtin__.type
- Returns message attributes
- gets(cls, unread=True, folder='inbox', *attrs) from __builtin__.type
- Returns a List of all message IDs
- ids(cls, unread=True, folder='inbox') from __builtin__.type
- Returns a List of all message IDs
- mark(cls, read=True, *id) from __builtin__.type
- Marks messages as read
- send(cls, address, text) from __builtin__.type
- Sends an SMS
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Uri(_Facade) |
| |
- Method resolution order:
- Uri
- _Facade
- __builtin__.object
Methods defined here:
- __init__(self, init='')
- __str__(self)
- attr(self)
- Content Resolver Query Attributes
- content(self)
- Content Resolver Query
- pick(self)
- Display content to be picked by URI (e.g. contacts)
- set(self, uri)
- view(self, type, **extras)
- Start activity with view action by URI (i.e. browser, contacts, etc.)
Data descriptors inherited from _Facade:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
|