|
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 |
public interface DeviceManager
Interface that defines access to device-specific functionality, such as camera and GPS. Java code should make use of this interface via DeviceManagerFactory.getInstance(). Internally, the DeviceDataControl also makes use of this interface to fulfill requests for device side functionality.
Field Summary | |
---|---|
static int |
CAMERA_DESTINATIONTYPE_DATA_URL |
static int |
CAMERA_DESTINATIONTYPE_FILE_URI |
static int |
CAMERA_ENCODINGTYPE_JPEG |
static int |
CAMERA_ENCODINGTYPE_PNG |
static int |
CAMERA_SOURCETYPE_CAMERA |
static int |
CAMERA_SOURCETYPE_PHOTOLIBRARY |
static int |
CAMERA_SOURCETYPE_SAVEDPHOTOALBUM |
Method Summary | |
---|---|
void |
clearWatchPosition(java.lang.String watchId) Stop receiving location updates by de-registering the location listener with specified watchId |
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. |
int |
getAvailableScreenHeight() Get the height of the screen available for drawing controls, in pixels. |
int |
getAvailableScreenWidth() Get the width of the screen availble for drawing controls, in pixels. |
Location |
getCurrentPosition(int maximumAge, boolean enableHighAccuracy) Get the current position. |
java.lang.String |
getModel() Get the device's model number/ID |
java.lang.String |
getName() Get the device's name |
java.lang.String |
getNetworkStatus() Get the device's current network connectivity status |
java.lang.String |
getOs() Get the operating system that the application is running on |
java.lang.String |
getPhonegap() Get the version of PhoneGap in use by the ADF Mobile Framework |
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 |
java.lang.String |
getPlatform() Get the device type that the application is running on |
double |
getScreenDiagonalSize() Get the size of the screen, measured on the diagonal in inches |
int |
getScreenDpi() Get the screen's pixel density, measured in dots per inch (DPI) |
int |
getScreenHeight() Get the width of the screen, in pixels. |
double |
getScreenScaleFactor() Get the scale factor to use when determining how to size user interface elements |
int |
getScreenWidth() Get the width of the screen, in pixels. |
java.lang.String |
getVersion() Get the operating system version number |
boolean |
hasAccelerometer() Does the device have an accelerometer? |
boolean |
hasCamera() Does the devie have a camera? |
boolean |
hasCompass() Does the device have a compass? |
boolean |
hasContacts() Does the device have an address book? |
boolean |
hasFileAccess() Does the device have access to the file system? |
boolean |
hasGeolocation() Does the device support geolocation services? |
boolean |
hasLocalStorage() Does the device have some kind of local storage (may not necessarily be the file system) |
boolean |
hasMediaPlayer() Is the device capable of playing back audio/video? |
boolean |
hasMediaRecorder() Is the device capable of recording audio/video? |
boolean |
hasTouchScreen() Does the device have a touchscreen? |
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 |
java.lang.String |
startUpdatingPosition(int updateInterval, boolean enableHighAccuracy, java.lang.String watchID, GeolocationCallback callback) Register a callback to receive regular updates on the device's position |
Contact |
updateContact(Contact aContact) Update an existing Contact object. |
Field Detail |
---|
static final int CAMERA_DESTINATIONTYPE_DATA_URL
static final int CAMERA_DESTINATIONTYPE_FILE_URI
static final int CAMERA_SOURCETYPE_PHOTOLIBRARY
static final int CAMERA_SOURCETYPE_CAMERA
static final int CAMERA_SOURCETYPE_SAVEDPHOTOALBUM
static final int CAMERA_ENCODINGTYPE_JPEG
static final int CAMERA_ENCODINGTYPE_PNG
Method Detail |
---|
Location getCurrentPosition(int maximumAge, boolean enableHighAccuracy)
maximumAge
- - accept a cached value no older than this value, in millisecondsenableHighAccuracy
- - use the most accurate possible method of obtaining a location fix. Note this is just a hint; the operating system may not respect itAdfException
java.lang.String startUpdatingPosition(int updateInterval, boolean enableHighAccuracy, java.lang.String watchID, GeolocationCallback callback)
updateInterval
- - how often to retrieve the position in milliseconds.enableHighAccuracy
- - provides a hint that the application would like to receive the best possible results, even at increased power/computation expense (boolean)watchID
- - a unique identifier that can be used as a handle to subsequently stop listening for updatescallback
- - An implementation of GeolocationCallback, which will be invoked at the specified updateInterval to deliver the device's locationvoid clearWatchPosition(java.lang.String watchId)
watchId
- - an identifier previously used to register a GeolocationCallbackjava.lang.String getName()
java.lang.String getPlatform()
java.lang.String getVersion()
java.lang.String getOs()
java.lang.String getModel()
java.lang.String getPhonegap()
boolean hasCamera()
boolean hasContacts()
boolean hasTouchScreen()
boolean hasGeolocation()
java.lang.String getNetworkStatus()
int getScreenWidth()
int getScreenHeight()
int getAvailableScreenWidth()
int getAvailableScreenHeight()
boolean hasAccelerometer()
boolean hasCompass()
boolean hasFileAccess()
boolean hasLocalStorage()
boolean hasMediaPlayer()
boolean hasMediaRecorder()
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 maintainedContact createContact(Contact aContact)
aContact
- - a previously-constructed Contact objectvoid removeContact(Contact aContact)
aContact
- - the Contact object to removeContact updateContact(Contact aContact)
aContact
- - the modified Contact object to persist in the device's address book.Contact[] findContacts(java.lang.String contactFields, java.lang.String filter, boolean multiple)
contactFields
- - comma-delimited list of field names to match on, e.g. "id,displayName,name,nickname,phoneNumbers,emails,addresses,ims,organizations birthday,note,photos,categories,urls". Note that categories is always null in the return value on iOS and Android devices.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 filtervoid 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.void sendSMS(java.lang.String to, java.lang.String body)
to
- - recipient list (comma-separated)body
- - text of messageint getScreenDpi()
double getScreenScaleFactor()
double getScreenDiagonalSize()
|
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 |