From de7dcf8ae565789374d491c7717641ded1a9b15b Mon Sep 17 00:00:00 2001 From: Young-Ae Kang Date: Thu, 18 May 2017 17:08:42 +0900 Subject: [PATCH] Add C# API guide template. Change-Id: I615ea3b096741a8a425233244b5aa0b2a670df56 --- .../images/context_trigger_rule_components.png | Bin 0 -> 6593 bytes template/template_guides.htm | 266 +++++++++++++++++++++ 2 files changed, 266 insertions(+) create mode 100644 template/images/context_trigger_rule_components.png create mode 100644 template/template_guides.htm diff --git a/template/images/context_trigger_rule_components.png b/template/images/context_trigger_rule_components.png new file mode 100644 index 0000000000000000000000000000000000000000..eeb73ab498601a4cbfa66e4919c4acba75944065 GIT binary patch literal 6593 zcmd5>c{tQ>*QXG&M6wRDgk;S&V~uErY=dm2>{-JwjIl*!31iK^k3HGS(%7VSQ zMn?V)xL%+>2Yi?978w9Plu7Po;E6yCg$pOenHLoTlP9G zHb1n&!C*<=&!^emOa0^NBmFIY8~s84Cu%3`GfI*vImQoOvi=59mfJgKR9i(e*%)Fp+W(BWhu%M3Z1WgudGEeJhZuUh zIph5^$a(7Iw^;D55>Mt-^I>7r%`}bR?R7t#izah2R`Z)<^G^GmdqAyyx(4bhexT`P zu_hx=;InOLs3B$nh4gKwJN(KMJoW3GU0B(>>tmsp-{Jx_>5{Qx5>_Wk?+0Nr_5Bmj zxtqa9Ka-+yk(yM%n;d0RquboCozo{-kEu#7-K!Znu3F(|<}k#BHToWhb1qX?$)NjZ zhO&lYc;H%xKl)Bbiv-W*fhe~&UJQ+0oojyWbp5F_vy6Y>)^8{-S(7Xod$s?tr9t&i zirh)M5J&I=_dSKm3N3XAt?f`ghg@&Ag3QGArxub*zr4$zeBH|#{;SSw6WeC??5Ohm z<2PGFvP1L7ZSbOh&16GxiVZAwkXP}{LL^fWMX2%8o+4*1hvk9JM<7_J|DQaHe1iAt zX&++y9pdUmbehTL>Q?UTP}t zxIOp^&sqgZWH_7J5~8S7H|7$(_GdDWdzJ9zXHH;Uh7SwiY(gJXnWBDMitX&di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`v!6y!w%szpGN@AzlQ%$HEiu^{8y35pLy*s~+RfR)JxCJp zRYCovHy-}Ft3Pwx@4se|7LXG(lpbtma5F9RQ7hWYOp331Bq#AFU_#F4cYSh@FxN?s zTUo_<)g*w;U(%Eu$MC-eT5w|{&7nN%*K2}D>h7|*`6Lw<1HL7pNWVBCVZb?K@WDV` zt-l%E@!J*IcAL~j2$oA8r%D2N^#SjuRXwp3wb$`@={79p)tjccHpQm+ygmaxYiy>V z91!!&LhV$pKBoCuqCuM?aF{qFxgDRI&pOwDCM4)Fm}`x*=$!ntjwsiF#Qm+$L?jVL g&4)N3m7HEU2wGB0>s-D8{Ov-ft);J7sbL-VU-@966951J literal 0 HcmV?d00001 diff --git a/template/template_guides.htm b/template/template_guides.htm new file mode 100644 index 0000000..5a8cfd8 --- /dev/null +++ b/template/template_guides.htm @@ -0,0 +1,266 @@ + + + + + + + + + + + + + + + + + TITLE + + + + + + + + +
+ + + +
+

Mobile C# + Wearable C# + TV C# +

+
+ + + + + +
+

Dependencies

+
    +
  • Tizen 4.0 and Higher for Mobile
  • +
  • Tizen 4.0 and Higher for Wearable
  • +
  • Tizen 4.0 and Higher for Mobile and Wearable
  • +
  • Tizen 4.0 and Higher for Mobile and TV
  • +
  • Tizen 4.0 and Higher for Mobile, Wearable, and TV
  • +
+ + + +

Content

+ +

+ + + +

Related Info

+ +
+
+ +
+ + + +

Alarm

+ + + +

You can launch an application at a specific time using alarms. The mechanism involved in launching the application is the App Control API (in mobile and wearable applications).

+

The AppControl API allows launching an application explicitly, giving its package name, or providing certain criteria that the application must meet. For example, the criteria can include the type of data on which the application must be able to operate. The structure containing the criteria is called an application control.

+ +

The following figure illustrates the rule components and their relations.

+ + + +

Figure: Rule components

+

Rule components

+ + + + +

The main features of the Alarm API include:

+ + + + +

Trigering events

+

This feature is ......

+ + + +

Prerequisites

+

To enable your application to use the alarm functionality:

+
    +
  1. To use the Alarm API (in mobile and wearable applications), the application has to request permission by adding the following privileges to the tizen-manifest.xml file: + +
    +<privileges>
    +   <privilege>http://tizen.org/privilege/alarm.get</privilege>
    +   <privilege>http://tizen.org/privilege/alarm.set</privilege>
    +</privileges>
    +		 
    + +
  2. +
  3. To use the functions and data types of the Alarm API, include the <app_alarm.h> header file in your application: +
    +#include <app_alarm.h>
    +		 
    +
  4. +
+ + + +

Setting an Alarm after Specific Time

+ + + +
+ Note + Since 2.4, the alarm_schedule_after_delay() function does + not support an exact period and delay to minimize the wake-ups of the +device. The system can adjust when the alarm expires. +
+ +

To set an alarm after a specific time:

+ +
    +
  1. +

    Implement the AlarmRegister application:

    +
    1. +

      To identify which application to start when the alarm expires, the Alarm API needs the app_control_h handle.

      +

      Obtain the app_control_h handle of a specific app by calling the app_control_set_app_id() function. You can get the AlarmTarget app_id from the tizen-manifest.xml file.

      + + + +
      +bool
      +init_alarm()
      +{
      +    int ret;
      +    int DELAY = 2;
      +    int REMIND = 1;
      +    int alarm_id;
      +
      +    app_control_h app_control = NULL;
      +    ret = app_control_create(&app_control);
      +    ret = app_control_set_operation(app_control, APP_CONTROL_OPERATION_DEFAULT);
      +    ret = app_control_set_app_id(app_control, "org.tizen.alarmslave");
      +			
      +
    2. + +
    3. +

      To schedule an alarm after a delay, use the alarm_schedule_after_delay() function:

      + +
      +void
      +service_app_control(app_control_h app_control, void *data)
      +{
      +    dlog_print(DLOG_INFO, LOG_TAG, "app_control called by Alarm API.");
      +}
      +			
      + +
    +
  2. + +
  3. +

    Implement the AlarmTarget application:

    +

    A scheduled alarm calls AlarmTarget's app_control_cb() callback when the alarm expires:

    +
    +void
    +service_app_control(app_control_h app_control, void *data)
    +{
    +    dlog_print(DLOG_INFO, LOG_TAG, "app_control called by Alarm API.");
    +}
    +			
    +
  4. +
+ +

Setting an Alarm on a Specific Date

+ +

To schedule an alarm on a specific date, use the alarm_schedule_at_date() function.

+

The second parameter defines the time of the first active alarm. It can be defined using the tm struct included in the <time.h> header file. The following table lists the selected tm fields.

+ + + +

Table: tm fields

+
+ + + + + + + + + + + + + + +
MemberTypeMeaningRange
tm_secintSeconds after the minute0-61*
+ + + + +
+ + +Go to top + + + + + + +
-- 2.7.4