|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.3.0) E27204-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.adf.model.datacontrols.device.DeviceDataControl
public class DeviceDataControl
Master device data control class. Services such as Device Properties, Geolocation, and Camera are encapsulated in this class. This is also used directly by JDeveloper to expose these services at design time in the DataControl palette.
Constructor Summary | |
---|---|
DeviceDataControl() |
Method Summary | |
---|---|
Contact |
createContact(Contact aContact) Save a previously-created Contact to the device's address book. |
Contact[] |
findContacts(java.lang.String contactFields, java.lang.String filter, boolean multiple) Enables retrieval of one or more Contact objects matching the specified criteria. |
java.lang.String |
getPicture(int quality, int destinationType, int sourceType, boolean allowEdit, int encodingType, int targetWidth, int targetHeight) Provides access to the device's default camera application, which enables taking a picture or retrieving a previously-saved image See PhoneGap documentation for more details: http://docs.phonegap.com/en/1.0.0/phonegap_camera_camera.md.html#camera.getPicture |
void |
removeContact(Contact aContact) Remove a contact from the address book See PhoneGap documentation for more details: http://docs.phonegap.com/en/1.0.0/phonegap_contacts_contacts.md.html#Contacts |
void |
sendEmail(java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String body, java.lang.String bcc, java.lang.String attachments, java.lang.String mimeTypes) Display the operating system's default UI for sending an e-mail, and optionally pre-populate certain fields. |
void |
sendSMS(java.lang.String to, java.lang.String body) Display the operating system's default UI for sending a text message, and optionally pre-populate certain fields |
void |
startLocationMonitor(boolean enableHighAccuracy, int updateInterval, java.lang.String locationListener) Register a callback to receive regular updates on the device's position |
Contact |
updateContact(Contact aContact) Update an existing Contact object. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DeviceDataControl()
Method Detail |
---|
public void startLocationMonitor(boolean enableHighAccuracy, int updateInterval, java.lang.String locationListener)
enableHighAccuracy
- - provides a hint that the application would like to receive the best possible results (boolean)updateInterval
- - defines how often to retrieve the position in milliseconds.locationListener
- - The name of a bean method that will be invoked in response to a location update, e.g. "MyBean.myMethod". Do not use EL syntax, unless you truly want the result of evaluating that expression to become the name of the locationListenerpublic Contact createContact(Contact aContact)
aContact
- - a previously-constructed Contact objectpublic Contact updateContact(Contact aContact)
aContact
- - the modified Contact object to persist in the device's address book.public void removeContact(Contact aContact)
aContact
- - the Contact object to removepublic Contact[] findContacts(java.lang.String contactFields, java.lang.String filter, boolean multiple)
contactFields
- - comma-delimited list of field names to match on, e.g. "name,address"filter
- - search criteria. Note that the search criteria is matched against all fields specified in contactFields, so if you specify "John", a Contact object will be matched if any of the fields specified in contactFields (e.g. name OR address OR phonenumber) contains the filter stringpublic void sendSMS(java.lang.String to, java.lang.String body)
to
- - recipient list (comma-separated)body
- - text of messagepublic void sendEmail(java.lang.String to, java.lang.String cc, java.lang.String subject, java.lang.String body, java.lang.String bcc, java.lang.String attachments, java.lang.String mimeTypes)
to
- - recipient list (comma-separated)cc
- - carbon copy recipient list (comma-separated)subject
- - subject linebody
- - text of e-mailbcc
- - blind carbon copy recipient list (comma-separated)attachments
- - list of files to attach (comma-separated). Must be specified as absolute filenames; use AdfmfJavaUtilities.getDirectoryPathRoot() to help determine absolute filename.mimeTypes
- - list of MIME types, specified in the same order as the list of attachments. Specify null to let the system automatically determine MIME types for all attachments, or leave blanks in the comma-separated list to indicate the system should determine the MIME type only for those selected attachments. Example: attachments = "www/foo.txt,www/bar.png", mimetypes = "text/plain," means the first attachment is of type text/plain, but the system should automatically determine the MIME type for the second one.public java.lang.String getPicture(int quality, int destinationType, int sourceType, boolean allowEdit, int encodingType, int targetWidth, int targetHeight)
quality
- - Quality of saved image. Range is [0, 100]destinationType
- - Choose the format of the return value. 0 = DESTINATIONTYPE_DATA_URL = Return image as base64 encoded string 1 = DESTINATIONTYPE_FILE_URI = Return image as a filename URI, like "file:///absolute/path/to/image.png" DESTINATIONTYPE_FILE_URI is recommended to avoid exhausting device resources.sourceType
- - Where should the picture come from? 0 = SOURCETYPE_PHOTOLIBRARY = Device's photo library 1 = SOURCETYPE_CAMERA = Take a picture with the device's camera 2 = SOURCETYPE_SAVEDPHOTOALBUM = Device's saved photo albumallowEdit
- - Allow simple editing of image before selectionencodingType
- - Choose the encoding of the returned image file. 0 = ENCODING_TYPE_JPEG = JPEG image 1 = ENCODING_TYPE_PNG = PNG imagetargetWidth
- - Width in pixels to scale image. Must be used with targetHeight. Aspect ratio is maintainedtargetHeight
- - Height in pixels to scale image. Must be used with targetWidth. Aspect ratio is maintained
|
Oracle Fusion Middleware Java API Reference for Oracle ADF Mobile 11g Release 2 (11.1.2.3.0) E27204-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |