From d8b62ffe87461a4da9a1face8354038051198882 Mon Sep 17 00:00:00 2001 From: "pr.jung" Date: Mon, 28 Dec 2015 11:05:15 +0900 Subject: [PATCH] Add tutorial and guide for feedback Change-Id: Iab197124bcf58738d1b042b47b5e5552133481ae Signed-off-by: pr.jung --- org.tizen.guides/html/native/system/feedback_n.htm | 88 ++++++++++++ org.tizen.guides/html/native/system/storage_n.htm | 118 ++++++++-------- .../html/native/system/feedback_tutorial_n.htm | 149 +++++++++++++++++++++ 3 files changed, 296 insertions(+), 59 deletions(-) create mode 100644 org.tizen.guides/html/native/system/feedback_n.htm create mode 100644 org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm diff --git a/org.tizen.guides/html/native/system/feedback_n.htm b/org.tizen.guides/html/native/system/feedback_n.htm new file mode 100644 index 0000000..690af18 --- /dev/null +++ b/org.tizen.guides/html/native/system/feedback_n.htm @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + Feedback + + + + +
+
+

Mobile native

+
+ + +
+ +
+

Feedback

+ +

Tizen enables you to play feedback pattern.

+

There is Feedback API to play feedback as feedback types and patterns.

+ + + + + + + + + + + + + + + + +
+ Table: Feedback Types +
EnumDescription
FEEDBACK_TYPE_SOUNDSound type
FEEDBACK_TYPE_VIBRATIONVibration type
+

The main features of the Feedback API include:

+
    +
  • Sound management

    Feedback API requests to play sound to sound-server by using mm-keysound library.

    You can feedback by sound using the feedback_play(pattern) or feedback_play_type(FEEDBACK_TYPE_SOUND, pattern) function.

    +
  • +
  • Vibration management +

    Feedback API requests to vibrate to deviced by using dbus method call. As per vibration data type on vibration.conf, it requests haptic monotone or haptic effect to deviced.

    You can feedback by vibration using the feedback_play(pattern) or feedback_play_type(FEEDBACK_TYPE_VIBRATION, pattern) function.

+ + + + + +
+ +Go to top + + + + + + + diff --git a/org.tizen.guides/html/native/system/storage_n.htm b/org.tizen.guides/html/native/system/storage_n.htm index aed0d65..d75348e 100644 --- a/org.tizen.guides/html/native/system/storage_n.htm +++ b/org.tizen.guides/html/native/system/storage_n.htm @@ -5,13 +5,13 @@ - + - Storage + Storage @@ -20,76 +20,76 @@

Mobile native Wearable native

- + - +

Storage

-

Tizen enables you to get storage information and manage directories.

-

The Storage API provides access to accessible parts of the file system, which are represented as virtual root locations. The virtual roots form a collection of locations that function as a single virtual device file system. The following table lists the supported virtual roots.

- +

Tizen enables you to get storage information and manage directories.

+

The Storage API provides access to accessible parts of the file system, which are represented as virtual root locations. The virtual roots form a collection of locations that function as a single virtual device file system. The following table lists the supported virtual roots.

+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- Table: Filesystem virtual roots -
Virtual rootDescription
imagesLocation for storing images.
soundsLocation for storing sound files.
videosLocation for storing videos.
cameraLocation for storing camera files.
downloadsLocation for storing downloaded items.
musicLocation for storing audio files.
documentsLocation for storing documents.
othersLocation for storing other files.
ringtonesLocation for ringtones (read-only location).
-

The main features of the Storage API include:

-
    + Table: Filesystem virtual roots + + + + Virtual root + Description + + + images + Location for storing images. + + + sounds + Location for storing sound files. + + + videos + Location for storing video files. + + + camera + Location for storing photos. + + + downloads + Location for storing downloaded items. + + + music + Location for storing audio files. + + + documents + Location for storing documents. + + + others + Location for storing other files. + + + ringtones + Location for ringtones (read-only location). + + + +

    The main features of the Storage API include:

    +
    • Storage management

      You can manage different storages on the device with the Storage APIs.

      You can retrieve additional information about the storages, including which storage is supported in the device using the storage_foreach_device_supported() function. The callback function returns the storage type, mount state, and virtual root path.

      -
    • -
    • Storage space management +
    • +
    • Storage space management

      You can get the available and total space size of the storage with the storage_get_total_space() and storage_get_available_space() functions. They return the storage size, excluding the minimum memory size to launch the low memory pop-up in case of a low memory situation. Consequently, the available size must be less than the original available size, and you must use these functions to get the memory size. For the same reason, you cannot use the statvfs function directly in Tizen. Instead, use storage_get_internal_memory_size() and storage_get_external_memory_size(). The Statvfs structure has a different structure size defined by "__USE_FILE_OFFSET64". However, you can ignore this, since the Storage API uses a proper function automatically.

    - + @@ -114,4 +114,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga - \ No newline at end of file + diff --git a/org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm b/org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm new file mode 100644 index 0000000..4f1d060 --- /dev/null +++ b/org.tizen.tutorials/html/native/system/feedback_tutorial_n.htm @@ -0,0 +1,149 @@ + + + + + + + + + + + + + + Feedback: Playing Sound and Vibrate Patterns + + + + + + +
    +

    Feedback: Playing Sound and Vibrating Patterns

    + + +

    This tutorial demonstrates how you can feedback for patterns.

    + + +

    Warm-up

    +

    Become familiar with the Feedback API basics by learning about:

    + + +

    Playing Feedback for Specific Pattern

    + +

    Play sound and vibrate for specific pattern.

    +
      +
    1. To use the functions and data types of the Feedback API (in mobile applications), include the <feedback.h> header file in your application:

      +
      +#include <feedback.h>
      +
    2. +
    3. To play feedback:

      +
        +
      • Play feedback pattern with feedback_play() function. +

        The function returns whether playing feedback is success or not.

        +

        It invokes the sound_play and vibrator_play internally. It return success when pattern enum is valid.

        +
        +int ret;
        +ret = feedback_play(pattern);
        +
        +
      • + +
      +
    4. +
    + +

    Playing Feedback for Specific Type and Pattern

    + +

    Play sound and vibrate for specific type and pattern.

    +
      +
    1. To use the functions and data types of the Feedback API (in mobile applications), include the <feedback.h> header file in your application:

      +
      +#include <feedback.h>
      +
    2. +
    3. To play feedback:

      +
        +
      • Play feedback pattern with feedback_play_type() function. + +

        The function returns whether playing feedback is success or not.

        +

        Internally it invokes the sound_play or vibrator_play as feedback type. It return success when pattern enum is valid.

        +
        +static int ret;
        +ret = feedback_play(type, pattern);
        +
        +
      +
    4. +
    + +

    Checking whether Pattern is Supported

    + +

    Retrieve information whether specific pattern is supported.

    + +
      +
    1. To use the functions and data types of the Feedback API (in mobile applications), include the <feedback.h> header file in your application:

      +
      +#include <feedback.h>
      +
    2. +
    3. Retrieve support information:

      +
        +
      • Retreive information wheter specific pattern is supported for specific feedback type with feedback_is_supported_pattern() function. +

        The function returns whether retreiving feedback information is success or not.

        +

        Internally it invokes the sound_is_supported or vibrator_is_supported as feedback type.

        +
        +static int ret;
        +bool status;
        +ret = feedback_is_supported_pattern(type, pattern, &status);
        +
        + +
      • +
      +
    + + + + +
    + +Go to top + + + + + + + + -- 2.7.4