From: Daehyeon Jung Date: Tue, 30 Jun 2015 11:20:08 +0000 (+0900) Subject: add Background category description X-Git-Tag: tizen_3.0/TD_SYNC/20161201~748^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5115138712e6f2acb0a34dcc7547049dca3c5191;p=sdk%2Fonline-doc.git add Background category description Change-Id: I1510297f1bdb10209c0ec4c861fb63c7a77b65d2 Signed-off-by: Daehyeon Jung --- diff --git a/org.tizen.gettingstarted/html/native/app_model/application_model_n.htm b/org.tizen.gettingstarted/html/native/app_model/application_model_n.htm index b66cacd..4995e18 100644 --- a/org.tizen.gettingstarted/html/native/app_model/application_model_n.htm +++ b/org.tizen.gettingstarted/html/native/app_model/application_model_n.htm @@ -66,6 +66,7 @@ These devices have constraints, such as relatively small screen sizes and lack o
  • A system event (such as an incoming phone call) occurs and causes a resident application with a higher priority to become active and temporarily hide your application.

  • An alarm is triggered for another application, which becomes the top-most window and hides your application.

  • +

    Since Tizen 2.4, the application on the background will go into the suspended state. In the suspended state, the application process will executed with limited CPU resources. In other words, the platform will not allow running the background application except some applications such as Media, Download and etc. that should necessary to work on the background. In this case, the application can designate their background category as allowed categories to avoid changing the suspended state. See Allowing Applications to Run on the Background for more information.

    When your application becomes visible again, the app_resume_cb() callback is invoked. The visibility returns, when:

    -

    Since the service application has no UI, it also has no pause state.

    +

    Because the service application has no UI, it also has no pause state. Since Tizen 2.4, the service application could go into the suspended state. Basically, the service application is running on the background by its nature; so the platform will not allow running the service application unless designated as a background category application. However, when the UI application that is packaged with the service application is running in foreground, the service application is also regarded as a foreground application and it can be run without designating background category.

    Application state changes are managed by the underlying framework. For more information about application state transitions, see Managing Application States and Transitions.

    diff --git a/org.tizen.gettingstarted/html/native/process/setting_properties_n.htm b/org.tizen.gettingstarted/html/native/process/setting_properties_n.htm index daca313..b1e5dd8 100644 --- a/org.tizen.gettingstarted/html/native/process/setting_properties_n.htm +++ b/org.tizen.gettingstarted/html/native/process/setting_properties_n.htm @@ -326,6 +326,7 @@
  • Export DataControl functionality.

    You can export data functionalities of your Tizen native application.

    To define a data control used to export application data, click Add and define the data control details.

  • +
  • Add background category type(since Tizen 2.4).

    You can describe background category of your Tizen native application.

    To add background category types to allow run on the background, click Add and select the category type.

  • diff --git a/org.tizen.guides/html/native/app/application_n.htm b/org.tizen.guides/html/native/app/application_n.htm index 070bcb9..ab95063 100644 --- a/org.tizen.guides/html/native/app/application_n.htm +++ b/org.tizen.guides/html/native/app/application_n.htm @@ -27,6 +27,7 @@
  • Launching Applications
  • Handling Alarms
  • Managing Application States and Transitions
  • +
  • Allowing Application to Run on the Background
  • Localizing Application Strings
  • Related Info

    @@ -618,7 +619,96 @@ static void app_control(app_control_h app_control, void *user_data)

    Figure: Application state transitions

    Application state transitions

    - + +

    Allowing Applications to Run on the Background

    +

    Since Tizen 2.4, the application is not allowed to run on the background except declared to run on the background explicitly. The following table lists the supported background categories. +

    +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + Table: Allowed Background Application Policy +
    Background CategoryDescriptionRelated APIsManifest background-category value
    MediaPlaying audio, recording, and outputting streaming video in backgroundMultimedia APImedia
    DownloadDownloading data with the Tizen download-manager APIDownload-manager APIdownload
    Background networkProcessing general network operation in background (Sync-manager, IM / VOIP)Sync-manager, Socket, Curlbackground-network
    LocationProcessing location data in backgroundLocation APIlocation
    Sensor (context)Processing context data from the sensors such as gestureSensor APIsensor
    IoT Communication/ConnectivityCommunicating between external devices in background such as Wi-Fi, BluetoothWi-Fi, Bluetooth APIiot-communication
    + +

    Describing Background Category

    +

    An application with background running capability should declare the background category in its manifest file:

    + +
    <?xml version="1.0" encoding="utf-8"?>
    +   <manifest xmlns="http://tizen.org/ns/packages" api-version="2.4" package="org.tizen.test" version="1.0.0">
    +   <ui-application appid="org.tizen.test" exec="text" type="capp" multiple="false" taskmanage="true" nodisplay="false">
    +      <icon>rest.png</icon>
    +      <label>rest</label>
    +      <background-category value="media"/>
    +      <background-category value="download"/>
    +      <background-category value="background-network"/>
    +   </ui-application>
    +   <service-application appid="org.tizen.test-service" exec="test-service" multiple="false" type="capp"/>
    +      <background-category value="background-network"/>
    +      <background-category value="location"/>
    +   </service-application>
    +</manifest>
    +
    + + + + + + + + + +
    Note

    <background-category> element is supported for the API version equal or higher than 2.4

    +

    The background category of your application can be specified in the +application project settings in the IDE.

    + + +

    Localizing Application Strings

    Tizen provides localized resources to make your application usable for different countries. The localization is based on the Internationalization API (in mobile and wearable applications), which makes strings translatable and places them in .po (portable object) files.

    @@ -872,4 +962,4 @@ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga - \ No newline at end of file +