From 4b787adc895a7c69ae09118bc500ed054645618f Mon Sep 17 00:00:00 2001 From: Somin Kim Date: Mon, 25 Sep 2017 18:49:11 +0900 Subject: [PATCH] [ACR-1069] Context history API is supported in wearable - updated history guide for providing API in wearable 4.0 - updated context trigger/history guide PS2: Reviewed PS3: Fixed two erroneous commas Change-Id: I2604195b6806aeb5681c6b61ee3d33aa832185d3 Signed-off-by: Somin Kim --- org.tizen.guides/html/native/alarm/trigger_n.htm | 11 ++++++ .../html/native/personal/context_n.htm | 44 ++++++++++++++++------ .../html/native/personal/personal_cover_n.htm | 2 +- 3 files changed, 45 insertions(+), 12 deletions(-) diff --git a/org.tizen.guides/html/native/alarm/trigger_n.htm b/org.tizen.guides/html/native/alarm/trigger_n.htm index b94fac6..47205ba 100644 --- a/org.tizen.guides/html/native/alarm/trigger_n.htm +++ b/org.tizen.guides/html/native/alarm/trigger_n.htm @@ -774,6 +774,17 @@ if (disabled_rule_ids) { CONTEXT_TRIGGER_SMS, CONTEXT_TRIGGER_MMS + CONTEXT_TRIGGER_EVENT_CONTACTS + CONTEXT_TRIGGER_EVENT + String + CONTEXT_TRIGGER_CHANGED + + + CONTEXT_TRIGGER_TYPE + String + CONTEXT_TRIGGER_MY_PROFILE, CONTEXT_TRIGGER_PERSON + + CONTEXT_TRIGGER_EVENT_ACTIVITY_STATIONARY

CONTEXT_TRIGGER_EVENT_ACTIVITY_WALKING

diff --git a/org.tizen.guides/html/native/personal/context_n.htm b/org.tizen.guides/html/native/personal/context_n.htm index 52a918d..6a26e81 100644 --- a/org.tizen.guides/html/native/personal/context_n.htm +++ b/org.tizen.guides/html/native/personal/context_n.htm @@ -16,13 +16,14 @@
-

Mobile native

+

Mobile native Wearable native

Dependencies

  • Tizen 2.4 and Higher for Mobile
  • +
  • Tizen 4.0 and Higher for Wearable

Content

@@ -46,9 +48,8 @@

The Tizen platform collects data on the device usage. Based on this data, the applications can take advantage of the user's application usage patterns through statistical analysis.

-

This feature is supported in mobile applications only.

+

The Contextual History API provides history data about application usage, media playback, communications, and device settings. Among context history data types, CONTEXT_HISTORY_RECENTLY_USED_APP, CONTEXT_HISTORY_FREQUENTLY_USED_APP, CONTEXT_HISTORY_BATTERY_USAGE, and CONTEXT_HISTORY_RECENT_BATTERY_USAGE are available for both mobile and wearable devices. The other history data types are supported in mobile applications only.

-

The Contextual History API provides history data about application usage, media playback, communications, and device settings.

The main features of the Contextual History API include:

  • Getting a profile data list @@ -66,11 +67,11 @@ context_history_get_list(handle, CONTEXT_HISTORY_FREQUENTLY_USED_APP, filter, &a
  • Enumerating profile data lists

    You can enumerate the records contained in the retrieved profile data list.

    -

    Once the context_history_list_h data handle is retrieved through the context_history_get_list() function, you can retrieve the attributes of each data record of the handle. You can use the context_history_list_get_current() function to get the current record and the context_history_record_get_string() and context_history_record_get_int() functions to access its values.

  • +

    Once the context_history_list_h data handle is retrieved through the context_history_get_list() function, you can retrieve the attributes of each data record of the handle. You can use the context_history_list_get_current() function to get the current record and the context_history_record_get_string(), context_history_record_get_int(), and context_history_record_get_double() functions to access its values.

Prerequisites

-

To use the functions and data types of the Contextual History API, include the <context_history.h> header file in your application:

+

To use the functions and data types of the Contextual History API (in mobile and wearable applications), include the <context_history.h> header file in your application:

 #include <context_history.h>
 
@@ -91,16 +92,13 @@ context_history_filter_h filter; context_history_filter_create(&filter); -
  • Get information about the 5 applications used most frequently during the last 2 weeks (14 days) while a headphone has been connected: +
  • Get information about the 5 applications used most frequently during the last 2 weeks (14 days):
     /* Requesting the top 5 applications */
     context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_RESULT_SIZE, 5);
     
     /* Limiting the time span of usage logs to 14 days */
     context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_TIME_SPAN, 14);
    -
    -/* Limiting the context to the applications used while a headphone is connected */
    -context_history_filter_set_int(filter, CONTEXT_HISTORY_FILTER_AUDIO_JACK, CONTEXT_HISTORY_FILTER_AUDIO_JACK_CONNECTED);
     
  • Retrieve profile data based on the defined filter: @@ -185,6 +183,8 @@ context_history_destroy(handle);

    CONTEXT_HISTORY_RARELY_USED_APP

    CONTEXT_HISTORY_PEAK_TIME_FOR_APP

    CONTEXT_HISTORY_COMMON_SETTING_FOR_APP

    +

    CONTEXT_HISTORY_BATTERY_USAGE

    +

    CONTEXT_HISTORY_RECENT_BATTERY_USAGE

    The contextual history contains data on which applications are used on the foreground. From this data, the following statistics are provided: @@ -194,6 +194,7 @@ context_history_destroy(handle);
  • Peak time for applications, or the time period when the user most frequently uses an application during the day.

    The result is a sorted list of hours of the day, in a descending order of the application use count in each one-hour time slot.

  • Common settings for applications, or the most common setting values regarding an application or any applications.
  • +
  • Most battery consuming applications, in a descending order of the battery consumption.
  • The required privilege is http://tizen.org/privilege/apphistory.read. @@ -239,7 +240,7 @@ context_history_destroy(handle);

    Filters and Attributes

    -

    Regarding each history data type, 1 or more filters can be set to specify the necessary statistics. For example, applications can get information about the 3 most frequently used applications from the last 30 days while a headphone is connected by setting the filters of the result size, time span, and the audio jack status. The supported filters for the history data types are summarized in the following table.

    +

    Regarding each history data type, 1 or more filters can be set to specify the necessary statistics. For example, applications can get information about the 3 most frequently used applications from the last 30 days by setting the filters of the result size and time span. The supported filters for the history data types are summarized in the following table.

    Table: Supported filters for history data

    @@ -252,7 +253,8 @@ context_history_destroy(handle); @@ -465,6 +467,26 @@ context_history_destroy(handle); This attribute denotes when a call is connected or a message is received or sent last in Unix epoch in seconds, to or from the address defined with CONTEXT_HISTORY_ADDRESS. + + + + + + + + + + + +
    - All types + All types, except: +

    CONTEXT_HISTORY_RECENT_BATTERY_USAGE

    CONTEXT_HISTORY_FILTER_TIME_SPAN Integer
    + CONTEXT_HISTORY_BATTERY_USAGE +

    CONTEXT_HISTORY_RECENT_BATTERY_USAGE

    +
    CONTEXT_HISTORY_APP_IDString + This attribute denotes the application ID. +

    For more information on the application IDs, see Package ID and Application ID.

    +
    CONTEXT_HISTORY_TOTAL_AMOUNTDouble + This attribute denotes the accumulated battery consumption of the application. +
    diff --git a/org.tizen.guides/html/native/personal/personal_cover_n.htm b/org.tizen.guides/html/native/personal/personal_cover_n.htm index f2cad28..7422e44 100644 --- a/org.tizen.guides/html/native/personal/personal_cover_n.htm +++ b/org.tizen.guides/html/native/personal/personal_cover_n.htm @@ -61,7 +61,7 @@

    You can manage address books, persons, contacts, and contact groups on a device. You can add, modify, and monitor contacts. You can also convert contacts to the vCard format.

    -
  • Contextual Device Usage History Data in mobile applications only +
  • Contextual Device Usage History Data

    The Tizen platform collects data on the device usage. Based on this data, you can retrieve the user's application usage patterns, such as information about frequently used applications, from the device usage history to perform statistical analysis.

  • -- 2.7.4