This section describes the available application, device, and cloud service methods. Each service is briefly described, repeating some of the information from Chapters 8 and 9, with a listing of the service’s available methods, arguments, and responses.
All services are accessed through:
Mojo.Service.Request(serviceName, {method:methodName, parameters:{}, onSuccess:{}, onFailure:{}})
Each service entry includes:
The serviceName
in the form
of a string such as 'palm://com.palm.name'
A description of each method, with the methodName
and parameters
properties
The contents of the response
object, which is provided as an argument in the callbacks to either
the onSuccess
or onFailure
functions
palm://com.palm.accounts/crud |
The Accounts service provides an interface for interacting with the accounts system. To use the Synergy applications, you must provide an account ID as a parameter; this service provides access to those IDs.
Many of the methods will use some common objects.
Lists accounts created by this application.
Parameters | Type | Description |
---|---|---|
None |
Parameters | Type | Description |
---|---|---|
account | Object | Account object specifying account data |
Gets the details of an account.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use accessing the account or for services that are based on the account |
Updates an account with revised data type, icons, or a change to read/write permissions.
Deletes account data for one or more data types.
palm://com.palm.power/timeout |
The Alarm service is based on the device’s real-time clock (RTC). Alarms are intended to wake applications while minimized, maximized, or to drive polling for Dashboard applications.
Sets an alarm to wake up the application.
Clears a previously set alarm.
Parameters | Type | Description |
---|---|---|
key | String | The key provided in the method call |
palm://com.palm.applicationManager |
The Application Manager service provides functions related to finding and launching applications. Applications launched through the Application Manager will open and maximize a new window for the targeted application while minimizing the current application window. This is the general case of specific application services. Currently supported are:
Audio
Browser
Maps
Messaging
Phone
Photos
Video
For details on calling individual services, refer to the specific service in this section.
The Application Manager will use the content type to find the appropriate application to use for that content. Refer to Tables B-1, B-2, and B-3 for the supported content types.
Response | Type | Description |
---|---|---|
None |
Table B-1. Supported file types
Extension | Mime type |
---|---|
htm | text/html |
html | text/html |
application/pdf | |
txt | application/txt |
doc | application/doc |
doc | application/msword |
xls | appId”:"com.palm.app.docviewer |
xls | appId”:"com.palm.app.docviewer |
xls | application/vnd.ms-excel |
xls | application/x-excel |
xls | application/x-msexcel |
ppt | application/ppt |
ppt | application/mspowerpoint |
ppt | application/powerpoint |
ppt | application/vnd.ms-powerpoint |
ppt | application/x-mspowerpoint |
Table B-2. Supported video formats
Extension | Mime type |
---|---|
mp4 | video/mp4-generic |
mp4 | video/quicktime |
mp4 | video/mp4 |
mp4 | video/mpeg4 |
m4v | video/mp4-generic |
m4v | video/quicktime |
m4v | video/mp4 |
m4v | video/mpeg4 |
3gp | video/3gp |
3gpp | video/3gp |
3g2 | video/3gpp |
3gpp2 | video/3gpp |
sdp | application/sdp |
Table B-3. Supported audio formats
Extension | Mime type |
---|---|
3gp | audio/3gpp |
3gpp | audio/3gpp |
3ga | audio/3gpp |
3gp | audio/3ga |
3gpp | audio/3ga |
3ga | audio/3ga |
3g2 | audio/3gpp2 |
3gp2 | audio/3gpp2 |
sdp | audio/amr |
amr | audio/x-amr |
mp3 | audio/mpa |
mp3 | audio/mp3 |
mp3 | audio/x-mp3 |
mp3 | audio/x-mpg |
mp3 | audio/mpeg |
mp3 | audio/mpeg3 |
mp3 | audio/mpg3 |
mp3 | audio/mpg |
mp4 | audio/mp4 |
m4a | audio/mp4 |
m4a | audio/m4a |
aac | audio/aac |
aac | audio/x-aac |
aac | audio/mpeg |
aac | audio/mp4a-latm |
wav | audio/wav |
pls | audio/x-scpls |
m3u | audio/mpegurl |
m3u | audio/x-mpegurl |
palm://com.palm.applicationManager |
The Audio application can be launched through the Application Manager service.
palm://com.palm.calendar/crud |
The Calendar API provides programmatic access to the Calendar application. It allows you to create, read, update, delete, and list calendars, events, and attendees. To use this API you must have an account created via the Accounts API. An account has many calendars, a calendar has many events, and an event has many attendees.
Many of the APIs will use the calendar
or event
objects as input or output
argument.
Calendar | ||
---|---|---|
Properties | Type | Description |
calendarId | String | Immutable unique identifier for this calendar |
name | String | Display name for this calendar |
externalId | String | External ID for this calendar |
On methods that accept a calendarId
as an input argument (getCalendar
, updateCalendar
, and deleteCalendar
), you can alternately provide
an externalId
and an accountId
.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
calendar | Object | Specify the |
Parameters | Type | Description |
---|---|---|
calendarId | String | Immutable unique identifier for this calendar |
Parameters | Type | Description |
---|---|---|
calendar | Object | Specify the |
Lists all calendars created by the calling application; you will see only the calendars that you have created.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
Adds the provided event to the named calendar.
Retrieves the details of the named event.
Parameters | Type | Description |
---|---|---|
eventId | String | Immutable unique identifier for this event |
Updates the event details of the named event.
Lists all events created by the calling application; you will only see events in calendars that you have created.
Enables change tracking for an account. After this is called, all
user-initiated changes to records belonging to this account will be
returned by getChanges
. Change
tracking is incremental, and changes are forgotten each time doneWithChanges
is called.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
trackerId | String | A client-chosen handle if multiple independent change trackers are needed per account |
Gets a list of calendar and event IDs for records in an account that
have been changed or deleted by the user since the last time doneWithChanges
was called.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
trackerId | String | A client-chosen handle if multiple independent change trackers are needed per account |
Forgets all changes for an account. Future calls to getChanges
will return only changes from
this point forward.
palm://com.palm.connectionmanager |
Use the Connection Manager’s getStatus
method to get updates on the device
connection status.
Gets connections status and optionally subscribes to connection notifications.
Parameters | Type | Description |
---|---|---|
subscribe | Boolean | Set to true for subscriptions, default is false |
palm://com.palm.contacts/crud |
The Contacts API provides programmatic access to the Contacts application. It allows you to create, read, update, delete, and list contacts entries. To use this API you must have an account created via the Accounts API.
Many of the APIs will use the contacts
or contactslice
objects as input or output
arguments.
On methods that accept an id
as an input argument (get
, update
, and delete
), you can alternately provide an
externalId
and an accountId
.
Adds the provided record to contacts.
Retrieves the details of the named contact.
Parameters | Type | Description |
---|---|---|
id | String | Immutable unique identifier for this contact |
Updates the event details of the named contact.
Response | Type | Description |
---|---|---|
errorCode | Integer | If |
errorText | String | An error message; only
provided with |
Lists all contacts created by the calling application; you will see only Contact records that you have created.
Enables change tracking for an account. After this is called, all
user-initiated changes to records belonging to this account will be
returned by getChanges
. Change
tracking is incremental, and changes are forgotten each time doneWithChanges
is called.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
trackerId | String | A client-chosen handle if multiple independent change trackers are needed per account |
Gets a list of contact IDs for records in an account that have been
changed or deleted by the user since the last time doneWithChanges
was called.
Parameters | Type | Description |
---|---|---|
accountId | String | The account reference for use in the Synergy applications |
trackerId | String | A client-chosen handle if multiple independent change trackers are needed per account |
Forgets all changes for an account. Future calls to getChanges
will only return changes from
this point forward.
palm://com.palm.applicationManager |
The Email application can be launched through the Application Manager service.
Launches the Email application to the compose scene, which will be addressed with the provided email address.
Launches the Email application to the compose scene.
Response | Type | Description |
---|---|---|
None |
palm://com.palm.location |
Palm webOS provides basic location services to get single or multiple location fixes.
You can get the current position sourced from the built in GPS, or through Cell ID or WiFi ID, depending on what’s available.
Requests a continuous GPS fix by invoking the onSuccess
callback with a new location
object every time the service determines that the position of the
device has changed. In case of error, the service will call the
callback with error code set to some value greater than 0.
Parameters | Type | Description |
---|---|---|
subscribe | Boolean | Set to true for subscriptions, default is false |
Requests a location for the given latitude and longitude.
Parameters | Type | Description |
---|---|---|
latitude | Double | The latitude of the location in degrees |
longitude | Double | The longitude of the location in degrees |
palm://com.palm.applicationManager |
The Maps application can be launched through the Application Manager service.
Launches the Maps application to the map scene, which will be loaded from the results of a query if provided.
Launches the Maps application to the map view scene.
Response | Type | Description |
---|---|---|
None |
palm://com.palm.applicationManager |
The Messaging application can be launched through the Application Manager service.
Launches the Messaging application to the chat scene.
Response | Type | Description |
---|---|---|
None |
palm://com.palm.applicationManager |
The Phone application can be launched through the Application Manager service.
palm://com.palm.applicationManager |
The Photos application can be launched through the Application Manager service.
palm://com.palm.preferences/systemProperties |
Applications can request a named system property, currently limited to a unique device ID.
palm://com.palm.systemservice/time |
The system is designed to expose a set of services allowing applications to access some general system settings.
Requests the system time, and if the subscribe property is true, it will receive notifications when the timezone changes and/or the system time changes by a significant amount (currently five minutes).
Parameters | Type | Description |
---|---|---|
subscribe | Boolean | Set to true for subscriptions, default is false |
palm://com.palm.audio/systemsounds |
The System Sounds service is used to play audio feedback in response to user interaction, with low latency.
Plays a system sound using the feedback stream class. Intended for UI feedback such as UI button clicks, keypad clicks, and similar sounds. The available sound names are enumerated in Table B-4.
Parameters | Type | Description |
---|---|---|
name | String | Set to the name of the sound to play (see Table B-4 for a complete list of sound names) |
Table B-4. System sounds
Names | ||
---|---|---|
appclose back_01 default_425hz delete_01 discardingapp_01 down2 dtmf_0 dtmf_1 dtmf_2 dtmf_3 dtmf_4 dtmf_5 dtmf_6 dtmf_7 dtmf_8 dtmf_9 | browser_01 card_01 card_02 card_03 card_04 card_05 dtmf_asterisk dtmf_pound error_01 error_02 error_03 focusing launch_01 launch_02 launch_03 pagebacwards | pageforward_01 shuffle_02 shuffle_03 shuffle_04 shuffle_05 shuffle_06 shuffle_07 shuffle_08 shuffling_01 shutter switchingapps_01 switchingapps_02 switchingapps_03 tones_3beeps_otasp_done unassigned up2 |
palm://com.palm.applicationManager |
The Video application can be launched through the Application Manager service.
Launches the Video application to play or stream the file located at the target URI, downloading it first if not already on the device. If a URI is not specified, it will launch the video player to its normal starting scene.
Response | Type | Description |
---|---|---|
3.149.26.31