Tizen
Tizen features include handling events and organizing data.
The Tizen API is mandatory for both Tizen mobile and wearable profiles, which means that it is supported in all mobile and wearable devices. All mandatory APIs are supported on the Tizen Emulators.
The main Tizen features are:
-
Handling exceptions
Enables you to handle error situations in your application.
-
Handling generic events
Enables you to handle the results of asynchronous operations.
-
Managing location coordinates
Enables you to incorporate location information into your application.
-
Sorting and filtering data
Provides a set of basic definitions and interfaces that are used in the Tizen Web Device API.
Handling Exceptions
You can enable the Tizen APIs to throw errors synchronously with the WebAPIException interface (in mobile and wearable applications) of the Tizen API (in mobile and wearable applications), or return errors in the error event handlers of asynchronous methods with the WebAPIError interface (in mobile and wearable applications).
Note |
---|
Do not use the code attribute of the WebAPIException interface to distinguish errors, because the code of the exception object is set to 0 in case of new error types that are not defined in DOMException. |
Handling Generic Events
Generic event handling features allow you to handle the results of asynchronous operations. The operations can implemented using the SuccessCallback (in mobile and wearable applications) and ErrorCallback (in mobile and wearable applications) event handlers of the Tizen API.
Managing Location Coordinates
You can use the SimpleCoordinates interface (in mobile and wearable applications) to incorporate location information into your application. For example, you can simply use it to define coordinates:
var coordinates = new tizen.SimpleCoordinates(37.5665, 126.9779);
You can also define a latitude and longitude for a calendar event:
var event = new tizen.CalendarEvent( { description:"hospital", geolocation: new tizen.SimpleCoordinates(37.4889, 127.0876), startDate: new tizen.TZDate(2011, 11, 1, 14, 0), duration: new tizen.TimeDuration(2, "HOURS") });
Sorting and Filtering Data
The Tizen API provides a set of basic definitions and interfaces that are used in the Tizen Device API. The Tizen API contains filters and sorting modes for query methods, generic success and error event handlers, a generic error interface, and a simple coordinate interface for defining location information.
The main features of the Tizen API include:
- Filters
The Tizen API supports the following filter types, which are subtypes of the abstract filter (in mobile and wearable applications):
-
Attribute filter (in mobile and wearable applications)
Matches objects containing a defined attribute or attribute value. The match is determined based on match flags defined with the FilterMatchFlag type definition (in mobile and wearable applications).
-
Attribute range (in mobile and wearable applications)
Matches objects containing an attribute whose values are within a particular range.
-
Composite filter (in mobile and wearable applications)
Combines several filters into a set.
You can create attribute filters, attribute range filters, and composite filters to search for specific data and make complex queries. The attributes you can use with the filter types vary depending on the API you are using. For example, Calendar, Call History, Contact, Content, and Messaging query methods each have their own sets of supported filter attributes.
-
Attribute filter (in mobile and wearable applications)
- Sorting
You can sort the results of queried data using the SortMode interface (in mobile and wearable applications). The following sorting modes are supported:
-
"ASC": Ascending sorting order
-
"DESC": Descending sorting order
Note If you use a type attribute as a sort mode parameter, the sorting is not performed alphabetically since the attribute values are stored normally after the type conversion in the platform implementation.
For example, if the ContentType enum (in mobile and wearable applications) is the type attribute and the sorting order is "DESC", the sorting result is ordered according to the listed enum order:
- Image
- Video
- Audio
- Other
-
Calendar Filter Attributes
The following table lists the filter types you can use with specific calendar item attributes in the methods of the Calendar interface.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
No |
id.uid |
Yes |
No |
description |
Yes |
No |
summary |
Yes |
No |
isAllDay |
Yes |
No |
isDetached |
Yes |
No |
startDate |
Yes |
Yes |
location |
Yes |
No |
geolocation.latitude |
Yes |
Yes |
geolocation.longitude |
Yes |
Yes |
organizer |
Yes |
No |
visibility |
Yes |
No |
status |
Yes |
No |
priority |
Yes |
No |
categories |
Yes |
No |
dueDate |
Yes |
Yes |
completedDate |
Yes |
Yes |
progress |
Yes |
Yes |
endDate |
Yes |
Yes |
availability |
Yes |
No |
lastModificationDate |
Yes |
Yes |
alarms |
No* |
No |
attendees |
No* |
No |
recurrenceRule |
No* |
No |
* The attribute filter is only supported with the EXISTS flag.
Call History Filter Attributes
The following table lists the filter types you can use with specific call history attributes in the methods of the CallHistory interface.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
uid |
Yes |
Yes |
type |
Yes |
No |
features |
Yes |
No |
remoteParties.remoteParty |
Yes |
Yes |
remoteParties.personId |
Yes |
Yes |
startTime |
Yes |
Yes |
duration |
Yes |
Yes |
direction |
Yes |
No |
Contact Filter Attributes
The following table lists the filter types you can use with specific contact attributes in the methods of the AddressBook interface.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
Yes |
personId |
Yes |
Yes |
lastUpdated |
Yes |
Yes |
isFavorite |
Yes |
Yes |
birthday |
Yes |
Yes |
photoURI |
Yes |
No |
ringtoneURI |
Yes |
No |
name.prefix |
Yes |
No |
name.suffix |
Yes |
No |
name.firstName |
Yes |
No |
name.middleName |
Yes |
No |
name.lastName |
Yes |
No |
name.nicknames |
Yes |
No |
name.phoneticFirstName |
Yes |
No |
name.phoneticLastName |
Yes |
No |
name.displayName |
Yes |
No |
addresses.country |
Yes |
No |
addresses.region |
Yes |
No |
addresses.city |
Yes |
No |
addresses.streetAddress |
Yes |
No |
addresses.additionalInformation |
Yes |
No |
addresses.postalCode |
Yes |
No |
addresses.isDefault |
Yes |
No |
addresses.types |
No |
No |
phoneNumbers.number |
Yes |
No |
phoneNumbers.isDefault |
Yes |
No |
phoneNumbers.types |
No |
No |
emails.email |
Yes |
No |
emails.isDefault |
Yes |
No |
emails.types |
No |
No |
anniversaries.date |
Yes |
Yes |
anniversaries.label |
Yes |
No |
organizations.name |
Yes |
No |
organizations.department |
Yes |
No |
organizations.title |
Yes |
No |
organizations.role |
Yes |
No |
organizations.logoUri |
Yes |
No |
urls.url |
Yes |
No |
urls.type |
No |
No |
groupIds |
Yes |
Yes |
The following table lists the filter types you can use with specific person attributes in the methods of the ContactManager interface.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
No |
displayName |
Yes |
No |
contactCount |
Yes |
Yes |
hasPhoneNumber |
Yes |
No |
hasEmail |
Yes |
No |
isFavorite |
Yes |
No |
photoURI |
Yes |
No |
ringtoneURI |
Yes |
No |
displayContactId |
Yes |
No |
Content Filter Attributes
The following table lists the filter types you can use with specific content attributes in the methods of the ContentManager interface (in mobile and wearable applications).
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
No |
type |
Yes |
No |
mimeType |
No |
No |
name |
Yes |
No |
title |
Yes |
No |
contentURI |
Yes |
No |
thumbnailURIs |
Yes |
No |
releaseDate |
Yes |
Yes |
modifedDate |
Yes |
Yes |
size |
No |
No |
description |
Yes |
No |
rating |
Yes |
Yes |
geolocation.latitude |
Yes |
Yes |
geolocation.longitude |
Yes |
Yes |
album |
Yes |
No |
genres |
Yes |
No |
artists |
Yes |
No |
composers |
No |
No |
lyrics |
No |
No |
copyright |
No |
No |
bitrate |
No |
No |
trackNumber |
No |
No |
duration |
No |
No |
orientation |
No |
No |
Messaging Filter Attributes
The following tables list the filter types you can use with specific message attributes in the methods of the MessageStorage interface.
The following table lists the filter attributes related to the findMessage() method.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
No |
serviceId |
Yes |
No |
conversationId |
No |
No |
folderId |
Yes |
No |
type |
Yes |
No |
timestamp |
No |
Yes |
from |
Yes |
No |
to |
Yes |
No |
cc |
Yes |
No |
bcc |
Yes |
No |
body.plainBody |
Yes |
No |
isRead |
Yes |
No |
hasAttachment |
Yes |
No |
isHighPriority |
Yes |
No |
subject |
Yes |
No |
isResponseTo |
No |
No |
messageStatus |
No |
No |
attachments |
No |
No |
The following table lists the filter attributes related to the findConversations() method.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
Yes |
No |
type |
Yes |
No |
timestamp |
No |
Yes |
messageCount |
Yes |
No |
unreadMessages |
Yes |
No |
preview |
Yes |
No |
subject |
No |
No |
isRead |
No |
No |
from |
Yes |
No |
to |
Yes |
No |
cc |
No |
No |
bcc |
No |
No |
lastMessageId |
No |
No |
The following table lists the filter attributes related to the findFolders() method.
Attribute | Attribute filter supported | Attribute range filter supported |
---|---|---|
id |
No |
No |
parentId |
No |
No |
serviceId |
Yes |
No |
contentType |
No |
No |
name |
No |
No |
path |
No |
No |
type |
No |
No |
synchronizable |
No |
No |
Note |
---|
The FULLSTRING value of the FilterMatchFlag enumerator (in mobile and wearable applications) is not supported and returns an error callback. |