sample description sync: reviewed by LB
authorDonghyun Lee <dh0922.lee@samsung.com>
Fri, 16 Oct 2015 05:12:10 +0000 (14:12 +0900)
committerDonghyun Lee <dh0922.lee@samsung.com>
Fri, 16 Oct 2015 05:12:14 +0000 (14:12 +0900)
98 files changed:
org.tizen.sampledescriptions/html/images/appcommon_application_view_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_events_view_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_files_view_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_paths_view_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_ui_layout_1_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_ui_layout_2_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_ui_layout_3_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_ui_tabs_view_sd_mn.png
org.tizen.sampledescriptions/html/images/appcommon_workflow_sd_mn.png
org.tizen.sampledescriptions/html/images/appmanager_screen_1_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/appmanager_screen_2_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/appmanager_screen_3_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/appmanager_screen_4_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/context_history_main.png
org.tizen.sampledescriptions/html/images/context_history_result.png
org.tizen.sampledescriptions/html/images/ecore_thread_1.png
org.tizen.sampledescriptions/html/images/ecore_thread_2.png
org.tizen.sampledescriptions/html/images/ecore_thread_3.png
org.tizen.sampledescriptions/html/images/ecore_thread_4.png
org.tizen.sampledescriptions/html/images/event_custom_events_received_view_sd_mn.png
org.tizen.sampledescriptions/html/images/event_custom_events_view_sd_mn.png
org.tizen.sampledescriptions/html/images/event_system_events_view_sd_mn.png
org.tizen.sampledescriptions/html/images/event_ui_layout_1_sd_mn.png
org.tizen.sampledescriptions/html/images/event_ui_layout_2_sd_mn.png
org.tizen.sampledescriptions/html/images/event_ui_tabs_view_sd_mn.png
org.tizen.sampledescriptions/html/images/event_workflow_sd_mn.png
org.tizen.sampledescriptions/html/images/flashlight_screens.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/heartratemonitor_screen_1_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/heartratemonitor_screen_2_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/heartratemonitor_screen_3_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/heartratemonitor_screen_4_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/internationalization_add_languages_view_sd_mn.png
org.tizen.sampledescriptions/html/images/internationalization_global_en_us_view.png
org.tizen.sampledescriptions/html/images/internationalization_global_ko_kr_view.png
org.tizen.sampledescriptions/html/images/internationalization_local_pl_pl_view.png
org.tizen.sampledescriptions/html/images/internationalization_localization_tool_view_sd_mn.png
org.tizen.sampledescriptions/html/images/internationalization_ui_layout_sd_mn.png
org.tizen.sampledescriptions/html/images/internationalization_ui_view_sd_mn.png
org.tizen.sampledescriptions/html/images/internationalization_workflow_sd_mn.png
org.tizen.sampledescriptions/html/images/jpegexifeditor_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/memo.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/metadata_editor_sd_mn.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/mirror_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/mn_icon.png [deleted file]
org.tizen.sampledescriptions/html/images/morsecodeflashlight.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/mw_icon.png [deleted file]
org.tizen.sampledescriptions/html/images/pagenavigation_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/preference_main_view_sd.png
org.tizen.sampledescriptions/html/images/puzzle_background_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/puzzle_screen_1_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/puzzle_screen_2_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/puzzle_screen_3_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/resource_manager_en_us_lang_view.png
org.tizen.sampledescriptions/html/images/resource_manager_fr_fr_lang_view.png
org.tizen.sampledescriptions/html/images/resource_manager_hdpi_initial_view.png
org.tizen.sampledescriptions/html/images/resource_manager_ko_kr_lang_view.png
org.tizen.sampledescriptions/html/images/resource_manager_ldpi_initial_view.png
org.tizen.sampledescriptions/html/images/resource_manager_mdpi_initial_view.png
org.tizen.sampledescriptions/html/images/resource_manager_pl_pl_lang_view.png
org.tizen.sampledescriptions/html/images/resource_manager_res_conf_dlg_sd_mn.png
org.tizen.sampledescriptions/html/images/resource_manager_ui_layout_sd_mn.png
org.tizen.sampledescriptions/html/images/resource_manager_ui_view_sd_mn.png
org.tizen.sampledescriptions/html/images/resource_manager_workflow_sd_mn.png
org.tizen.sampledescriptions/html/images/resource_manager_xhdpi_initial_view.png
org.tizen.sampledescriptions/html/images/screenorientation_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/shapeeditor_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/soundmanager_screen_1_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/soundmanager_screen_2_ww.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/spiritlevel_mw.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/systemsetting_mw_sd.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/thumbnail_util_sd_mn.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/thumbnail_util_tree_sd_mn.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot.png
org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot_hints.png
org.tizen.sampledescriptions/html/images/wifi_info.png [new file with mode: 0644]
org.tizen.sampledescriptions/html/images/wn_icon.png [deleted file]
org.tizen.sampledescriptions/html/images/ww_icon.png [deleted file]
org.tizen.sampledescriptions/html/index.htm
org.tizen.sampledescriptions/html/mobile_n/metadata_editor_sd_mn.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_n/quickpanel_sd_mn.htm [deleted file]
org.tizen.sampledescriptions/html/mobile_n/sample_account_sd_mn.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_n/thumbnail_util_sd_mn.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/flashlight_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/jpegexifeditor_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/memo_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/mirror_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/morse_code_flashlight_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/pagenavigation_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/screenorientation_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/shapeeditor_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/spiritlevel_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/systemsettings_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/mobile_w/wifi_info_mw.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/wearable_w/appmanager_ww.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/wearable_w/heartratemonitor_ww.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/wearable_w/puzzle_ww.htm [new file with mode: 0644]
org.tizen.sampledescriptions/html/wearable_w/soundmanager_ww.htm [new file with mode: 0644]
org.tizen.sampledescriptions/index.xml

index 787c82f..6107f10 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_application_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_application_view_sd_mn.png differ
index ded57bd..8cba7a2 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_events_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_events_view_sd_mn.png differ
index b6c3bfa..1a89e4a 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_files_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_files_view_sd_mn.png differ
index daf1cad..6c20be3 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_paths_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_paths_view_sd_mn.png differ
index 6fdd216..7509cc2 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_1_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_1_sd_mn.png differ
index 12f6f33..167e5d4 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_2_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_2_sd_mn.png differ
index 2d8ce08..84db798 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_3_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_ui_layout_3_sd_mn.png differ
index 498d634..620d2a5 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_ui_tabs_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_ui_tabs_view_sd_mn.png differ
index f8018d8..c2ef1d6 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/appcommon_workflow_sd_mn.png and b/org.tizen.sampledescriptions/html/images/appcommon_workflow_sd_mn.png differ
diff --git a/org.tizen.sampledescriptions/html/images/appmanager_screen_1_ww.png b/org.tizen.sampledescriptions/html/images/appmanager_screen_1_ww.png
new file mode 100644 (file)
index 0000000..da48a42
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/appmanager_screen_1_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/appmanager_screen_2_ww.png b/org.tizen.sampledescriptions/html/images/appmanager_screen_2_ww.png
new file mode 100644 (file)
index 0000000..cb8b54c
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/appmanager_screen_2_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/appmanager_screen_3_ww.png b/org.tizen.sampledescriptions/html/images/appmanager_screen_3_ww.png
new file mode 100644 (file)
index 0000000..e7ec698
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/appmanager_screen_3_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/appmanager_screen_4_ww.png b/org.tizen.sampledescriptions/html/images/appmanager_screen_4_ww.png
new file mode 100644 (file)
index 0000000..4cde364
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/appmanager_screen_4_ww.png differ
index 681bea6..01d165d 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/context_history_main.png and b/org.tizen.sampledescriptions/html/images/context_history_main.png differ
index b05ca40..52780cb 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/context_history_result.png and b/org.tizen.sampledescriptions/html/images/context_history_result.png differ
index afe4f62..7073c81 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/ecore_thread_1.png and b/org.tizen.sampledescriptions/html/images/ecore_thread_1.png differ
index e235412..e8b7f21 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/ecore_thread_2.png and b/org.tizen.sampledescriptions/html/images/ecore_thread_2.png differ
index 9d7f59a..0f946ce 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/ecore_thread_3.png and b/org.tizen.sampledescriptions/html/images/ecore_thread_3.png differ
index dc2e284..41f6dda 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/ecore_thread_4.png and b/org.tizen.sampledescriptions/html/images/ecore_thread_4.png differ
index cfb7ded..e4e7454 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_custom_events_received_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_custom_events_received_view_sd_mn.png differ
index 74d5242..0982f4a 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_custom_events_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_custom_events_view_sd_mn.png differ
index c37ebe0..e5c472d 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_system_events_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_system_events_view_sd_mn.png differ
index 03cc6dd..b1edacf 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_ui_layout_1_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_ui_layout_1_sd_mn.png differ
index 8f3c2a3..39ca546 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_ui_layout_2_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_ui_layout_2_sd_mn.png differ
index c0900a1..c58ed32 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_ui_tabs_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_ui_tabs_view_sd_mn.png differ
index 971cf79..a5eb84d 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/event_workflow_sd_mn.png and b/org.tizen.sampledescriptions/html/images/event_workflow_sd_mn.png differ
diff --git a/org.tizen.sampledescriptions/html/images/flashlight_screens.png b/org.tizen.sampledescriptions/html/images/flashlight_screens.png
new file mode 100644 (file)
index 0000000..a338f89
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/flashlight_screens.png differ
diff --git a/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_1_ww.png b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_1_ww.png
new file mode 100644 (file)
index 0000000..bf63a3c
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_1_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_2_ww.png b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_2_ww.png
new file mode 100644 (file)
index 0000000..b9c5d73
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_2_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_3_ww.png b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_3_ww.png
new file mode 100644 (file)
index 0000000..ac13961
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_3_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_4_ww.png b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_4_ww.png
new file mode 100644 (file)
index 0000000..01d3199
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/heartratemonitor_screen_4_ww.png differ
index f46584e..35f075b 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_add_languages_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/internationalization_add_languages_view_sd_mn.png differ
index b2ac902..593992d 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_global_en_us_view.png and b/org.tizen.sampledescriptions/html/images/internationalization_global_en_us_view.png differ
index f6fdcba..22e02a7 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_global_ko_kr_view.png and b/org.tizen.sampledescriptions/html/images/internationalization_global_ko_kr_view.png differ
index d20078b..4a4c5ba 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_local_pl_pl_view.png and b/org.tizen.sampledescriptions/html/images/internationalization_local_pl_pl_view.png differ
index 896736f..2e53548 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_localization_tool_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/internationalization_localization_tool_view_sd_mn.png differ
index 10ddd7c..5a39d9f 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_ui_layout_sd_mn.png and b/org.tizen.sampledescriptions/html/images/internationalization_ui_layout_sd_mn.png differ
index a8a6619..544af52 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_ui_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/internationalization_ui_view_sd_mn.png differ
index 5118118..da7da9e 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/internationalization_workflow_sd_mn.png and b/org.tizen.sampledescriptions/html/images/internationalization_workflow_sd_mn.png differ
diff --git a/org.tizen.sampledescriptions/html/images/jpegexifeditor_mw.png b/org.tizen.sampledescriptions/html/images/jpegexifeditor_mw.png
new file mode 100644 (file)
index 0000000..c8459f0
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/jpegexifeditor_mw.png differ
diff --git a/org.tizen.sampledescriptions/html/images/memo.png b/org.tizen.sampledescriptions/html/images/memo.png
new file mode 100644 (file)
index 0000000..d0c4515
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/memo.png differ
diff --git a/org.tizen.sampledescriptions/html/images/metadata_editor_sd_mn.png b/org.tizen.sampledescriptions/html/images/metadata_editor_sd_mn.png
new file mode 100644 (file)
index 0000000..c99861b
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/metadata_editor_sd_mn.png differ
diff --git a/org.tizen.sampledescriptions/html/images/mirror_mw.png b/org.tizen.sampledescriptions/html/images/mirror_mw.png
new file mode 100644 (file)
index 0000000..85b1453
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/mirror_mw.png differ
diff --git a/org.tizen.sampledescriptions/html/images/mn_icon.png b/org.tizen.sampledescriptions/html/images/mn_icon.png
deleted file mode 100644 (file)
index 19a0fd3..0000000
Binary files a/org.tizen.sampledescriptions/html/images/mn_icon.png and /dev/null differ
diff --git a/org.tizen.sampledescriptions/html/images/morsecodeflashlight.png b/org.tizen.sampledescriptions/html/images/morsecodeflashlight.png
new file mode 100644 (file)
index 0000000..4e81659
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/morsecodeflashlight.png differ
diff --git a/org.tizen.sampledescriptions/html/images/mw_icon.png b/org.tizen.sampledescriptions/html/images/mw_icon.png
deleted file mode 100644 (file)
index a089898..0000000
Binary files a/org.tizen.sampledescriptions/html/images/mw_icon.png and /dev/null differ
diff --git a/org.tizen.sampledescriptions/html/images/pagenavigation_mw.png b/org.tizen.sampledescriptions/html/images/pagenavigation_mw.png
new file mode 100644 (file)
index 0000000..e95011b
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/pagenavigation_mw.png differ
index 39eb8f6..04d7cc8 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/preference_main_view_sd.png and b/org.tizen.sampledescriptions/html/images/preference_main_view_sd.png differ
diff --git a/org.tizen.sampledescriptions/html/images/puzzle_background_ww.png b/org.tizen.sampledescriptions/html/images/puzzle_background_ww.png
new file mode 100644 (file)
index 0000000..ae5d0f1
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/puzzle_background_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/puzzle_screen_1_ww.png b/org.tizen.sampledescriptions/html/images/puzzle_screen_1_ww.png
new file mode 100644 (file)
index 0000000..c0a1b69
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/puzzle_screen_1_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/puzzle_screen_2_ww.png b/org.tizen.sampledescriptions/html/images/puzzle_screen_2_ww.png
new file mode 100644 (file)
index 0000000..397bff8
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/puzzle_screen_2_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/puzzle_screen_3_ww.png b/org.tizen.sampledescriptions/html/images/puzzle_screen_3_ww.png
new file mode 100644 (file)
index 0000000..cea9aa9
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/puzzle_screen_3_ww.png differ
index 2716d1c..15e9503 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_en_us_lang_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_en_us_lang_view.png differ
index d962107..717ab67 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_fr_fr_lang_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_fr_fr_lang_view.png differ
index 4d7c11b..b1d76f7 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_hdpi_initial_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_hdpi_initial_view.png differ
index c9b2cd6..9291f5b 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_ko_kr_lang_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_ko_kr_lang_view.png differ
index d61738a..f4a266e 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_ldpi_initial_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_ldpi_initial_view.png differ
index 059d7dc..34e8909 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_mdpi_initial_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_mdpi_initial_view.png differ
index 309615e..f0c7820 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_pl_pl_lang_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_pl_pl_lang_view.png differ
index 83f1986..2098aa1 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_res_conf_dlg_sd_mn.png and b/org.tizen.sampledescriptions/html/images/resource_manager_res_conf_dlg_sd_mn.png differ
index b9939c4..28c6fbd 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_ui_layout_sd_mn.png and b/org.tizen.sampledescriptions/html/images/resource_manager_ui_layout_sd_mn.png differ
index 20e79c0..ff157e6 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_ui_view_sd_mn.png and b/org.tizen.sampledescriptions/html/images/resource_manager_ui_view_sd_mn.png differ
index e44d79d..c626cdf 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_workflow_sd_mn.png and b/org.tizen.sampledescriptions/html/images/resource_manager_workflow_sd_mn.png differ
index 0cdf79e..cd6908b 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/resource_manager_xhdpi_initial_view.png and b/org.tizen.sampledescriptions/html/images/resource_manager_xhdpi_initial_view.png differ
diff --git a/org.tizen.sampledescriptions/html/images/screenorientation_mw.png b/org.tizen.sampledescriptions/html/images/screenorientation_mw.png
new file mode 100644 (file)
index 0000000..ebc844e
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/screenorientation_mw.png differ
diff --git a/org.tizen.sampledescriptions/html/images/shapeeditor_mw.png b/org.tizen.sampledescriptions/html/images/shapeeditor_mw.png
new file mode 100644 (file)
index 0000000..709eb85
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/shapeeditor_mw.png differ
diff --git a/org.tizen.sampledescriptions/html/images/soundmanager_screen_1_ww.png b/org.tizen.sampledescriptions/html/images/soundmanager_screen_1_ww.png
new file mode 100644 (file)
index 0000000..d9bf67f
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/soundmanager_screen_1_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/soundmanager_screen_2_ww.png b/org.tizen.sampledescriptions/html/images/soundmanager_screen_2_ww.png
new file mode 100644 (file)
index 0000000..1556b79
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/soundmanager_screen_2_ww.png differ
diff --git a/org.tizen.sampledescriptions/html/images/spiritlevel_mw.png b/org.tizen.sampledescriptions/html/images/spiritlevel_mw.png
new file mode 100644 (file)
index 0000000..106ca95
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/spiritlevel_mw.png differ
diff --git a/org.tizen.sampledescriptions/html/images/systemsetting_mw_sd.png b/org.tizen.sampledescriptions/html/images/systemsetting_mw_sd.png
new file mode 100644 (file)
index 0000000..df2a834
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/systemsetting_mw_sd.png differ
diff --git a/org.tizen.sampledescriptions/html/images/thumbnail_util_sd_mn.png b/org.tizen.sampledescriptions/html/images/thumbnail_util_sd_mn.png
new file mode 100644 (file)
index 0000000..0a21445
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/thumbnail_util_sd_mn.png differ
diff --git a/org.tizen.sampledescriptions/html/images/thumbnail_util_tree_sd_mn.png b/org.tizen.sampledescriptions/html/images/thumbnail_util_tree_sd_mn.png
new file mode 100644 (file)
index 0000000..543cc3f
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/thumbnail_util_tree_sd_mn.png differ
index f25adaa..8ab4019 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot.png and b/org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot.png differ
index abd703c..434ec29 100644 (file)
Binary files a/org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot_hints.png and b/org.tizen.sampledescriptions/html/images/vc-elm-sample-screenshot_hints.png differ
diff --git a/org.tizen.sampledescriptions/html/images/wifi_info.png b/org.tizen.sampledescriptions/html/images/wifi_info.png
new file mode 100644 (file)
index 0000000..f5b69ab
Binary files /dev/null and b/org.tizen.sampledescriptions/html/images/wifi_info.png differ
diff --git a/org.tizen.sampledescriptions/html/images/wn_icon.png b/org.tizen.sampledescriptions/html/images/wn_icon.png
deleted file mode 100644 (file)
index bb5c915..0000000
Binary files a/org.tizen.sampledescriptions/html/images/wn_icon.png and /dev/null differ
diff --git a/org.tizen.sampledescriptions/html/images/ww_icon.png b/org.tizen.sampledescriptions/html/images/ww_icon.png
deleted file mode 100644 (file)
index 40de988..0000000
Binary files a/org.tizen.sampledescriptions/html/images/ww_icon.png and /dev/null differ
index 1ebd065..59b8b45 100644 (file)
@@ -22,7 +22,7 @@
 <div id="container"><div id="contents"><div class="content">
 <h1><a href="cover_page.htm">Sample Descriptions</a></h1>
 
-<h2><a href="sd_w.htm">Web Applications</a></h2>
+<h2><a href="sd_w.htm">Web Application</a></h2>
        <ul>
                <li><a href="mobile_w/sd_mw.htm">Mobile Web</a>
                <ul>
                        <li><a href="mobile_w/eventmanager_mw.htm">EventManager</a></li>
                        <li><a href="mobile_w/exerciseplanner_mw.htm">ExcercisePlanner</a></li>
                        <li><a href="mobile_w/filemanager_mw.htm">FileManager</a></li>
+                       <li><a href="mobile_w/flashlight_mw.htm">Flashlight</a></li>
                        <li><a href="mobile_w/fmradio_mw.htm">FMRadio</a></li>
                        <li><a href="mobile_w/hellotizen_mw.htm">HelloTizen</a></li>
+                       <li><a href="mobile_w/jpegexifeditor_mw.htm">JPEGExifEditor</a></li>
                        <li><a href="mobile_w/mediacontent_mw.htm">MediaContent</a></li>
+                       <li><a href="mobile_w/memo_mw.htm">Memo</a></li>
+                       <li><a href="mobile_w/mirror_mw.htm">Mirror</a></li>
                        <li><a href="mobile_w/moneybook_mw.htm">MoneyBook</a></li>
+                       <li><a href="mobile_w/morse_code_flashlight_mw.htm">Morse Code Flashlight</a></li>
                        <li><a href="mobile_w/multiprocess_hybrid_package_mw.htm">Multi-project Hybrid Application</a>
                        <ul>
                                <li><a href="mobile_w/hybridwebapp_mw.htm">HybridWebApp</a></li>
                        </ul></li>
+                       <li><a href="mobile_w/pagenavigation_mw.htm">PageNavigation</a></li>
                        <li><a href="mobile_w/piano_mw.htm">Piano</a></li>
+                       <li><a href="mobile_w/screenorientation_mw.htm">ScreenOrientation</a></li>
                        <li><a href="mobile_w/selfcamera_mw.htm">SelfCamera</a></li>
                        <li><a href="mobile_w/sensorball_mw.htm">SensorBall</a></li>
+                       <li><a href="mobile_w/shapeeditor_mw.htm">ShapeEditor</a></li>
                        <li><a href="mobile_w/soundmanager_mw.htm">SoundManager</a></li>
+                       <li><a href="mobile_w/spiritlevel_mw.htm">SpiritLevel</a></li>
                        <li><a href="mobile_w/systeminfo_mw.htm">Systeminfo</a></li>
+                       <li><a href="mobile_w/systemsettings_mw.htm">SystemSettings</a></li>
                        <li><a href="mobile_w/touchpaint_mw.htm">TouchPaint</a></li>
                        <li><a href="mobile_w/uicomponent_mw.htm">UIComponent</a></li>
-               
+                       <li><a href="mobile_w/wifi_info_mw.htm">WiFi Info</a></li>
                </ul>
                </li>
                <li><a href="wearable_w/sd_ww.htm">Wearable Web</a>
                <ul>
                        <li><a href="wearable_w/altimeter_ww.htm">Altimeter</a></li>
                        <li><a href="wearable_w/analogwatch_ww.htm">AnalogWatch</a></li>
+                       <li><a href="wearable_w/appmanager_ww.htm">App Manager</a></li>
                        <li><a href="wearable_w/appcalleecaller_ww.htm">AppCaller and AppCallee</a></li>
                        <li><a href="wearable_w/basicwatch_ww.htm">BasicWatch</a></li>                  
                        <li><a href="wearable_w/calculator_ww.htm">Calculator</a></li>
                        <li><a href="wearable_w/camera_ww.htm">Camera</a></li>
                        <li><a href="wearable_w/compass_ww.htm">Compass</a></li>
                        <li><a href="wearable_w/digitalwatch_ww.htm">DigitalWatch</a></li>
+                       <li><a href="wearable_w/heartratemonitor_ww.htm">HeartRateMonitor</a></li>
                        <li><a href="wearable_w/hellotizen_ww.htm">HelloTizen</a></li>
                        <li><a href="wearable_w/minigallery_ww.htm">MiniGallery</a></li>
                        <li><a href="wearable_w/moneybook_ww.htm">MoneyBook</a></li>
                        <li><a href="wearable_w/newsfeed_ww.htm">NewsFeed</a></li>
+                       <li><a href="wearable_w/puzzle_ww.htm">Puzzle</a></li>
                        <li><a href="wearable_w/sensorball_ww.htm">SensorBall</a></li>
+                       <li><a href="wearable_w/soundmanager_ww.htm">Sound Manager</a></li>
                        <li><a href="wearable_w/spinning_arrow_ww.htm">SpinningArrow</a></li>
                        <li><a href="wearable_w/stopwatch_ww.htm">StopWatch</a></li>
                        <li><a href="wearable_w/sunburnmonitor_ww.htm">SunburnMonitor</a></li>
        <ul>
                <li><a href="mobile_n/sd_mn.htm">Mobile Native</a>
                <ul>
+                       <li><a href="mobile_n/appcommon_sd_mn.htm">Application Common</a></li>
                        <li><a href="mobile_n/application_control_sd_mn.htm">Application Control</a></li>
                        <li><a href="mobile_n/bluetoothchat_sd_mn.htm">Bluetooth Chat</a></li>
                        <li><a href="mobile_n/bundle_sd_mn.htm">Bundle</a></li>
                        <li><a href="mobile_n/cairo_evasgl_sd_mn.htm">Cairo EvasGL</a></li>
                        <li><a href="mobile_n/calculator_sd_mn.htm">Calculator</a></li>
                        <li><a href="mobile_n/contacts_sd_mn.htm">Contacts</a></li>
-                       <li><a href="mobile_n/efl_core_samples_sd_mn.htm">EFL Core Samples</a></li>
+                       <li><a href="mobile_n/context_history_sd_mn.htm">Context History</a></li>
+                       <li><a href="mobile_n/context_trigger_sd_mn.htm">Context Trigger</a></li>
+                       <li><a href="mobile_n/efl_core_samples_sd_mn.htm">EFL Core</a></li>
                        <li><a href="mobile_n/evas_gl_sd_mn.htm">EvasGLCube</a></li>
+                       <li><a href="mobile_n/event_sd_mn.htm">Event</a></li>
                        <li><a href="mobile_n/file_manager_sd_mn.htm">File Manager</a></li>
                        <li><a href="mobile_n/glview11_cube_sd_mn.htm">GLView11Cube</a></li>
                        <li><a href="mobile_n/glview_cube_sd_mn.htm">GLViewCube</a></li>
                        <li><a href="mobile_n/gps_consumer_sd_mn.htm">GPS Consumer</a></li>
                        <li><a href="mobile_n/gps_service_sd_mn.htm">GPS Service</a></li>
                        <li><a href="mobile_n/hybridservice_sd_mn.htm">HybridServiceApp</a></li>
+                       <li><a href="mobile_n/internationalization_sd_mn.htm">Internationalization</a></li>
+                       <li><a href="mobile_n/lbs_geofence_sd_mn.htm">LBS Geofence</a></li>
+                       <li><a href="mobile_n/lbs_maps_sd_mn.htm">LBS Maps</a></li>
+                       <li><a href="mobile_n/oauth_sd_mn.htm">LibOauth</a></li>
                        <li><a href="mobile_n/lockscreen_sd_mn.htm">Lockscreen</a></li>
                        <li><a href="mobile_n/mediaapp_sd_mn.htm">Media App</a></li>
                        <li><a href="mobile_n/mediacontroller_client_sd_mn.htm">Media-controller-client</a></li>
                        <li><a href="mobile_n/mediacontroller_server_sd_mn.htm">Media-controller-server</a></li>
                        <li><a href="mobile_n/messageport_sd_mn.htm">Message Port</a></li>
+                       <li><a href="mobile_n/metadata_editor_sd_mn.htm">Metadata Editor</a></li>
                        <li><a href="mobile_n/notificationmanager_sd_mn.htm">Notification Manager</a></li>
+                       <li><a href="mobile_n/oauth2_sd_mn.htm">Oauth2</a></li>
                        <li><a href="mobile_n/paint_sd_mn.htm">Paint</a></li>
                        <li><a href="mobile_n/pedometer_sd_mn.htm">Pedometer</a></li>                   
                        <li><a href="mobile_n/piano_sd_mn.htm">Piano</a></li>
                        <li><a href="mobile_n/preference_sd_mn.htm">Preference</a></li>
                        <li><a href="mobile_n/puzzle_sd_mn.htm">Puzzle</a></li>
+                       <li><a href="mobile_n/resource_manager_sd_mn.htm">Resource Manager</a></li>
+                       <li><a href="mobile_n/sample_account_sd_mn.htm">Sample Account</a></li>
                        <li><a href="mobile_n/scheduler_sd_mn.htm">Scheduler</a></li>
                        <li><a href="mobile_n/scroller_index_sd_mn.htm">Scroller Index</a></li>
                        <li><a href="mobile_n/selfcamera_sd_mn.htm">SelfCamera</a></li>
                        <li><a href="mobile_n/sensorapp_sd_mn.htm">SensorApp</a></li>
+                       <li><a href="mobile_n/service_adaptor_sd_mn.htm">Service Adaptor</a></li>
                        <li><a href="mobile_n/simple_home_sd_mn.htm">Simple Homescreen</a></li>
                        <li><a href="mobile_n/sketch_sd_mn.htm">Sketch</a></li>
                        <li><a href="mobile_n/stopwatch_sd_mn.htm">Stopwatch</a></li>
                        <li><a href="mobile_n/syncadapterserviceapp_sd_mn.htm">Sync Adapter Service App</a></li>
                        <li><a href="mobile_n/systeminfo_sd_mn.htm">System Info</a></li>
                        <li><a href="mobile_n/taskmanager_sd_mn.htm">Taskmanager</a></li>
+                       <li><a href="mobile_n/thumbnail_util_sd_mn.htm">Thumbnail Util</a></li>
+                       <li><a href="mobile_n/tts_sd_mn.htm">TTS</a></li>
                        <li><a href="mobile_n/ui_components_sd_mn.htm">UI Components</a></li>
+                       <li><a href="mobile_n/voice_control_sd_mn.htm">Voice Control</a></li>   
+                       <li><a href="mobile_n/voice_control_elm_sd_mn.htm">Voice Control for EFL Components</a></li>
                        <li><a href="mobile_n/volume_sd_mn.htm">Volume</a></li>                 
                        <li><a href="mobile_n/ui_app_store_sd_mn.htm">[UI Sample] ApplicationStore</a></li>
                        <li><a href="mobile_n/ui_calculator_sd_mn.htm">[UI Sample] Calculator</a></li>
                        <li><a href="wearable_n/cairo_evasgl_sd_wn.htm">(Circle) Cairo EvasGL</a></li>
                        <li><a href="wearable_n/circleemail_sd_wn.htm">(Circle) Email</a></li>
                        <li><a href="wearable_n/circlerotarytimer_sd_wn.htm">(Circle) Rotary Timer</a></li>
+                       <li><a href="wearable_n/circlesensors_sd_wn.htm">(Circle) Sensors</a></li>
                        <li><a href="wearable_n/circlesettingtime_sd_wn.htm">(Circle) Setting Time</a></li>
                        <li><a href="wearable_n/circlesettings_sd_wn.htm">(Circle) Settings</a></li>
                        <li><a href="wearable_n/rectemail_sd_wn.htm">(Rectangle) Email</a></li>
                        <li><a href="wearable_n/rectnotificationmanager_sd_wn.htm">(Rectangle) NotificationManager</a></li>
                        <li><a href="wearable_n/rectsettings_sd_wn.htm">(Rectangle) Settings</a></li>
                        <li><a href="wearable_n/rectuidialer_sd_wn.htm">(Rectangle) UI Dialer</a></li>
+                       <li><a href="wearable_n/rectwidgetviewer_sd_wn.htm">(Rectangle) Widget Viewer</a></li>
                        <li><a href="wearable_n/analog_watch_sd_wn.htm">Analog Watch</a></li>
                        <li><a href="wearable_n/digital_watch_sd_wn.htm">Digital-Watch</a></li>
                        <li><a href="wearable_n/evas_gl_sd_wn.htm">EvasGLCube</a></li>  
diff --git a/org.tizen.sampledescriptions/html/mobile_n/metadata_editor_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/metadata_editor_sd_mn.htm
new file mode 100644 (file)
index 0000000..420b9aa
--- /dev/null
@@ -0,0 +1,161 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+       <title>Metadata Editor Sample Overview</title>
+</head>
+
+<body class="no-toc" onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+</div> 
+
+<div id="container"><div id="contents"><div class="content">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../images/mobile_s_n.png"/></p>
+       </div>
+  <h1>Metadata Editor Sample Overview</h1>
+<p>The Metadata Editor sample application demonstrates how to retrieve and modify metadata using the <a href="../../../org.tizen.native.mobile.apireference/group__CAPI__MEDIA__METADATA__EDITOR__MODULE.html">Metadata Editor</a> API.</p>
+<p>The following figure illustrates the main view of the Metadata Editor application.</p>
+
+  <p class="figure">Figure: Metadata Editor screen</p>
+  <p align="center">
+    <img alt="Metadata Editor screen" src="../images/metadata_editor_sd_mn.png" />
+  </p>
+
+<h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privilege must be set:</p>
+<ul>
+<li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/mediastorage</span>
+</li>
+</ul>
+  
+  
+<h2>Implementation</h2>
+
+<p>To get and update the metadata information in the media file:</p>
+<ol>
+<li>Get the metadata using the input path in the <span style="font-family: Courier New,Courier,monospace">get_clicked_cb()</span> function. Each parameter sets a text box to display.
+<pre class="prettyprint">
+static 
+void get_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_create(&amp;metadata);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;snprintf(full_path, sizeof(full_path), &quot;%s/%s&quot;, media_path, elm_object_text_get(t_path));
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_set_path(metadata, full_path);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_get_metadata(metadata, METADATA_EDITOR_ATTR_ARTIST, &amp;artist);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;elm_object_text_set(item_artist, artist);
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_get_metadata(metadata, METADATA_EDITOR_ATTR_TITLE, &amp;title);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;metadata_editor_destroy(metadata);
+}
+</pre>
+</li>
+<li>Update the metadata. 
+<p>The user can change the metadata parameters by clicking on an item and adding new data. When they have modified the metadata, they click the <strong>Update Metadata</strong> button, which calls the <span style="font-family: Courier New,Courier,monospace">update_clicked_cb()</span> function.</p>
+<pre class="prettyprint">
+{
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_create(&amp;metadata);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;snprintf(full_path, sizeof(full_path), &quot;%s/%s&quot;, media_path, elm_object_text_get(t_path));
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_set_path(metadata, full_path);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (media_path) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;free(media_path);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;media_path = NULL;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_set_metadata(metadata, METADATA_EDITOR_ATTR_ARTIST, elm_object_text_get(item_artist));
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_update_metadata(metadata);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;ret = metadata_editor_destroy(metadata);
+&nbsp;&nbsp;&nbsp;if (ret != METADATA_EDITOR_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;err_popup(ret);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+</li>
+</ol>
+  
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/mobile_n/quickpanel_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/quickpanel_sd_mn.htm
deleted file mode 100644 (file)
index ddad6c7..0000000
+++ /dev/null
@@ -1,535 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
-       <meta http-equiv="X-UA-Compatible" content="IE=9" />
-       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
-       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
-       <script type="text/javascript" src="../scripts/snippet.js"></script>    
-       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
-       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
-       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
-       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
-       <title>Quickpanel Sample Overview</title>
-</head>
-
-<body class="no-toc" onload="prettyPrint()" style="overflow: auto;">
-
-<div id="toc-navigation">
-</div> 
-
-<div id="container"><div id="contents"><div class="content">
-       <div id="profile">
-               <p><img alt="Mobile native" src="../images/mn_icon.png"/></p>
-       </div>
-  <h1>Quickpanel Sample Overview</h1>
-<p>The Quickpanel sample application demonstrates how to create a custom quickpanel window and use volume, LED, and Wi-Fi APIs to acquire and set related device settings.</p>
-<p>The following figure illustrates the application screens.</p>
-
-<p class="figure">Figure: Quickpanel screens</p>
-<p align="center">
- <img alt="Quickpanel screens" src="../images/quickpanel_1.png"/> <img alt="Quickpanel screens" src="../images/quickpanel_2.png"/> <img alt="Quickpanel screens" src="../images/quickpanel_3.png"/> <img alt="Quickpanel screens" src="../images/quickpanel_4.png"/>
-</p>
-
-<p>To make a quickpanel window visible, the user has to drag it from the upper section of the device's screen to the bottom. Three buttons appear at the top of the screen. With the buttons, the user can control the following device functionalities:</p>
-<ul>
- <li>Light: allows to control device's LED settings,</li>
- <li>Wi-Fi: allows to activate and deactivate Wi-Fi internal circuit,</li>
- <li>Sound: allows to switch the device into silent mode.</li>
-</ul>
-<p>Tap the icon to switch the setting on or off.</p>
-
-<p>The following figure illustrates the quickpanel layout structure.</p>
-
-<p class="figure">Figure: Quickpanel layout structure</p>
-<p align="center">
- <img alt="Quickpanel layout structure" src="../images/quickpanel_0.png"/>
-</p>
-
-<h2>Prerequisites</h2>
-<p>This application requires the following privileges to be set:</p>
-<ul>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/network.get</span></li>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/volume.set</span></li>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/network.set</span></li>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/bluetooth</span></li>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/privilege/led</span></li>
-</ul>
-<p>You are able to run the application only on devices supporting the following features:</p>
-
-<ul>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/feature/network.wifi</span></li>
- <li><span style="font-family: Courier New,Courier,monospace;">http://tizen.org/feature/led</span></li>
-</ul>
-
-<h2>Implementation</h2>
-
-<p>The Quickpanel application follows the MVC pattern. Aside from standard native application module with the <span style="font-family: Courier New,Courier,monospace">main()</span> function, it consists of:</p>
-<ul>
- <li><span style="font-family: Courier New,Courier,monospace;">controler.c</span> module</li>
- <li><span style="font-family: Courier New,Courier,monospace;">light.c</span>, <span style="font-family: Courier New,Courier,monospace;">sound.c</span>, and <span style="font-family: Courier New,Courier,monospace;">wifi.c</span> modules serving as the model</li>
- <li><span style="font-family: Courier New,Courier,monospace;">main_view.c</span>, <span style="font-family: Courier New,Courier,monospace;">control_panel.c</span> modules serving as the view</li>
-</ul>
-
-
-<h3>Controller</h3>
-
-<p>The application is initialized with the <span style="font-family: Courier New,Courier,monospace">controler_init()</span> function. This function creates the main view and initializes the rest of the modules. It also adds callbacks to the main view for control panel item click. This is how information about user interactions is delivered to the controller module.</p>
-<pre class="prettyprint">
-Eina_Bool
-controler_init(void)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_DEVICE_NAME, &amp;device_name);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;ret = system_settings_get_value_string(SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, &amp;wallpaper);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;result = main_view_create_base_gui(device_name);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;__init_modules();
-
-&nbsp;&nbsp;&nbsp;return EINA_TRUE;
-}
-</pre>
-<p>The <span style="font-family: Courier New,Courier,monospace">__init_modules()</span> function initializes Wi-Fi, light, sound modules. It also checks states of the modules and updates the main view to reflect them.</p>
-<p>Each module initialization procedure takes one or more callbacks as parameters. These callbacks are used to inform the controller module about the changes in respective modules. This is essential because these settings can also be changed from outside of the Quickpanel application and the view has to be updated accordingly.</p>
-<pre class="prettyprint">
-static void
-__init_modules(void)
-{
-&nbsp;&nbsp;&nbsp;bool result = false;
-
-&nbsp;&nbsp;&nbsp;result = wifi_init(__wifi_activated_cb, __wifi_deactivated_cb, __wifi_device_state_changed_cb);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;if (wifi_is_active())
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main_view_update(ICON_TYPE_WIFI, ICON_ACTION_ACTIVATION);
-
-&nbsp;&nbsp;&nbsp;result = light_init(__light_state_change_cb);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;if (light_is_active())
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main_view_update(ICON_TYPE_LIGHT, ICON_ACTION_ACTIVATION);
-
-&nbsp;&nbsp;&nbsp;result = sound_init(__sound_state_change_cb);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;if (sound_is_active())
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;main_view_update(ICON_TYPE_SOUND, ICON_ACTION_ACTIVATION);
-
-}
-</pre>
-
-<h3>Model</h3>
-
-<ul>
-<li>Light:
-<p>Currently the LED API does not deliver any interface to receive information about the light state change, so the light module is implemented using a polling timer callback to deliver this information to the controller module.</p>
-<pre class="prettyprint">
-bool
-light_init(light_state_change_cb state_change_cb)
-
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;light_data.change_cb = state_change_cb;
-
-&nbsp;&nbsp;&nbsp;if(light_data.change_cb) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;light_data.poll_timer = ecore_timer_add(LIGHT_POLL_INTERVAL_SEC, __light_poll_timeout_cb, NULL);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if(!light_data.poll_timer) 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;light_data.change_cb = false;
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;return true;
-}
-
-static Eina_Bool
-__light_poll_timeout_cb(void *data)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;if (light_is_active()) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;light_data.change_cb(true);
-&nbsp;&nbsp;&nbsp;} 
-&nbsp;&nbsp;&nbsp;else 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;light_data.change_cb(false);
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;return ECORE_CALLBACK_RENEW;
-}
-</pre>
-</li>
-<li>Sound:
-<p>In case of the Volume API, use the <span style="font-family: Courier New,Courier,monospace">sound_manager_set_volume_changed_cb()</span> function. The sound module uses this interface to communicate changes to the controller.</p>
-<p>The Quickpanel sample application takes into account changes in three sound types (as it serves as mute/unmute application):</p>
-<ul>
- <li>System: volume level of system sounds such as key taps</li>
- <li>Ringtone: volume level of an incoming call</li>
-</ul>
-<p>When the user wants to mute the phone, the application stores the initial volumes of these types and sets the current values to 0. The preserved volume values are restored when the user unmutes the phone.</p>
-
-<pre class="prettyprint">
-bool
-sound_init(sound_state_change_cb change_cb)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;result = sound_manager_set_volume_changed_cb(__volume_changed_cb, NULL);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;sound_data.change_cb = change_cb;
-
-&nbsp;&nbsp;&nbsp;sound_data.system_sound_level = __get_sound_level(SOUND_TYPE_SYSTEM);
-&nbsp;&nbsp;&nbsp;sound_data.ringtone_sound_level = __get_sound_level(SOUND_TYPE_RINGTONE);
-
-&nbsp;&nbsp;&nbsp;return true;
-}
-
-static void
-__volume_changed_cb(sound_type_e type, unsigned int volume, void *user_data)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;if (sound_data.muting_progress &gt; MUTING_PROGRESS_NONE &amp;&amp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.muting_progress &lt; MUTING_PROGRESS_MUTING_COMPLETE &amp;&amp;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;volume == 0) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.muting_progress++;
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (sound_data.muting_progress >= MUTING_PROGRESS_MUTING_COMPLETE) 
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.muting_progress = MUTING_PROGRESS_NONE;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (sound_data.change_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.change_cb(sound_is_active());
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;switch (type) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case SOUND_TYPE_SYSTEM:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.system_sound_level = (int)volume;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case SOUND_TYPE_RINGTONE:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.ringtone_sound_level = (int)volume;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;default:
-
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;if (sound_data.change_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sound_data.change_cb(sound_is_active());
-}
-</pre>
-</li>
-
-<li>Wi-Fi:
-<p>To use the Wi-Fi API functions, call the <span style="font-family: Courier New,Courier,monospace">wifi_initialize()</span> function first. A callback is registered for Wi-Fi state changes using the <span style="font-family: Courier New,Courier,monospace">wifi_set_device_state_changed_cb()</span> function. The registered callback function informs the controller module about Wi-Fi circuit state changes.</p>
-<pre class="prettyprint">
-bool
-wifi_init(wifi_activated_cb act_cb, wifi_deactivated_cb deact_cb, wifi_device_state_changed_cb dev_state_change)
-{
-&nbsp;&nbsp;&nbsp;int ret = WIFI_ERROR_NONE;
-&nbsp;&nbsp;&nbsp;ret = wifi_initialize();
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;ret = wifi_set_device_state_changed_cb(dev_state_change, NULL);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;if(act_cb &amp;&amp; !wifi_data.act_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wifi_data.act_cb = act_cb;
-
-&nbsp;&nbsp;&nbsp;if(deact_cb &amp;&amp; !wifi_data.deact_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wifi_data.deact_cb = deact_cb;
-
-&nbsp;&nbsp;&nbsp;return true;
-}
-</pre>
-
-<p>Switching the Wi-Fi circuit on or off is an asynchronous operation, so the <span style="font-family: Courier New,Courier,monospace">act_cb()</span> and <span style="font-family: Courier New,Courier,monospace">deact_cb()</span> functions have to be used to inform the controller module if the operation was successful.</p>
-<pre class="prettyprint">
-void
-wifi_set_on(void)
-{
-&nbsp;&nbsp;&nbsp;int res = WIFI_ERROR_NONE;
-
-&nbsp;&nbsp;&nbsp;if (!wifi_is_active()) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res = wifi_activate(wifi_data.act_cb, NULL);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Error handling
-&nbsp;&nbsp;&nbsp;} 
-&nbsp;&nbsp;&nbsp;else 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (wifi_data.act_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wifi_data.act_cb(WIFI_ERROR_NONE, NULL);
-&nbsp;&nbsp;&nbsp;}
-}
-
-void
-wifi_set_off(void)
-{
-&nbsp;&nbsp;&nbsp;int res = WIFI_ERROR_NONE;
-
-&nbsp;&nbsp;&nbsp;if (wifi_is_active()) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;res = wifi_deactivate(wifi_data.deact_cb, NULL);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Error handling
-&nbsp;&nbsp;&nbsp;} 
-&nbsp;&nbsp;&nbsp;else 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (wifi_data.deact_cb)
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;wifi_data.deact_cb(WIFI_ERROR_NONE, NULL);
-&nbsp;&nbsp;&nbsp;}
-}
-</pre>
-</li>
-</ul>
-
-<h3>View</h3>
-
-<p>Main view initialization part takes place with the <span style="font-family: Courier New,Courier,monospace">main_view_create_base_gui()</span> function. It creates the three view elements: a quickpanel window and the control panel.</p>
-<pre class="prettyprint">
-Eina_Bool
-main_view_create_base_gui(char *device_name)
-{
-&nbsp;&nbsp;&nbsp;vds.win = create_win();
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;if(!__quickpanel_setup())
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return EINA_FALSE;
-
-&nbsp;&nbsp;&nbsp;vds.layout = create_layout(device_name);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;vds.toolbar = control_panel_create(vds.layout, __light_click_cb, __wifi_click_cb, __sound_click_cb);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;return EINA_TRUE;
-}
-</pre>
-
-<p>The quickpanel window type is at first created as a standard window.</p>
-<pre class="prettyprint">
-static Evas_Object *
-create_win(void)
-{
-&nbsp;&nbsp;&nbsp;Evas_Object *bg = NULL;
-&nbsp;&nbsp;&nbsp;Evas_Object *win = elm_win_util_standard_add(PACKAGE, PACKAGE);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;bg = elm_bg_add(win);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;elm_win_resize_object_add(win, bg);
-&nbsp;&nbsp;&nbsp;evas_object_color_set(bg, QP_BG_COLOR_R, QP_BG_COLOR_G, QP_BG_COLOR_B, 255);
-&nbsp;&nbsp;&nbsp;evas_object_show(bg);
-
-&nbsp;&nbsp;&nbsp;elm_win_indicator_mode_set(win, ELM_WIN_INDICATOR_HIDE);
-&nbsp;&nbsp;&nbsp;elm_win_autodel_set(win, EINA_TRUE);
-&nbsp;&nbsp;&nbsp;elm_win_alpha_set(win, EINA_TRUE);
-
-&nbsp;&nbsp;&nbsp;// Window rotation support code
-
-&nbsp;&nbsp;&nbsp;evas_object_smart_callback_add(win, &quot;delete,request&quot;, win_delete_request_cb, NULL);
-&nbsp;&nbsp;&nbsp;eext_object_event_callback_add(win, EEXT_CALLBACK_BACK, win_back_cb, NULL);
-&nbsp;&nbsp;&nbsp;evas_object_smart_callback_add(win, &quot;rotation,changed&quot;, __ui_rotation_cb, NULL);
-
-&nbsp;&nbsp;&nbsp;evas_object_show(win);
-
-&nbsp;&nbsp;&nbsp;return win;
-}
-</pre>
-
-<p>Next, the window is given special properties and class with the <span style="font-family: Courier New,Courier,monospace">__quickpanel_setup()</span> function.</p>
-
-<pre class="prettyprint">
-static Eina_Bool
-__quickpanel_setup(void)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;Ecore_X_Window xwin = 0;
-&nbsp;&nbsp;&nbsp;elm_win_quickpanel_set(vds.win, EINA_TRUE);
-&nbsp;&nbsp;&nbsp;elm_win_quickpanel_priority_major_set(vds.win, 300);
-
-&nbsp;&nbsp;&nbsp;xwin = elm_win_xwindow_get(vds.win);
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;ecore_x_icccm_name_class_set(xwin, &quot;QUICKPANEL&quot;, &quot;QUICKPANEL&quot;);
-
-&nbsp;&nbsp;&nbsp;elm_win_screen_size_get(vds.win, NULL, NULL, &amp;w, &amp;h);
-
-&nbsp;&nbsp;&nbsp;vds.win_height = h;
-&nbsp;&nbsp;&nbsp;vds.win_width = w;
-
-&nbsp;&nbsp;&nbsp;set_ui_geometry_info();
-&nbsp;&nbsp;&nbsp;set_ui_handler_info();
-&nbsp;&nbsp;&nbsp;ecore_idler_add(ui_refresh_idler_cb, NULL);
-
-&nbsp;&nbsp;&nbsp;return EINA_TRUE;
-}
-</pre>
-
-<p>Window geometry is constantly monitored with the <span style="font-family: Courier New,Courier,monospace">ui_refresh_idler_cb()</span> and <span style="font-family: Courier New,Courier,monospace">__ui_rotation_cb()</span> callback functions. This information is acquired and passed to the underlying X Window System using the <span style="font-family: Courier New,Courier,monospace">set_ui_geometry_info()</span> and <span style="font-family: Courier New,Courier,monospace">set_ui_handler_info()</span> helper functions.</p>
-<pre class="prettyprint">
-static void
-set_ui_geometry_info(void)
-{
-&nbsp;&nbsp;&nbsp;int max_height_window = 0;
-&nbsp;&nbsp;&nbsp;Evas_Coord win_y = 0;
-
-&nbsp;&nbsp;&nbsp;if (vds.angle == 90 || vds.angle == 270) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_height_window = vds.win_width;
-&nbsp;&nbsp;&nbsp;} 
-&nbsp;&nbsp;&nbsp;else 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;max_height_window = vds.win_height;
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;evas_object_geometry_get(vds.win, NULL, &amp;win_y, NULL, NULL);
-
-&nbsp;&nbsp;&nbsp;vds.gl_distance_from_top = win_y - ELM_SCALE_SIZE(QP_HANDLE_H);
-&nbsp;&nbsp;&nbsp;vds.gl_distance_to_bottom = ELM_SCALE_SIZE(QP_HANDLE_H);
-&nbsp;&nbsp;&nbsp;vds.gl_limit_height = max_height_window - vds.gl_distance_from_top - vds.gl_distance_to_bottom;
-}
-static void
-set_ui_handler_info(void)
-{
-&nbsp;&nbsp;&nbsp;int contents_height = 0;
-
-&nbsp;&nbsp;&nbsp;contents_height = vds.gl_distance_from_top + vds.gl_limit_height;
-
-&nbsp;&nbsp;&nbsp;set_ui_handler_input_region(contents_height);
-&nbsp;&nbsp;&nbsp;set_ui_handler_content_region(contents_height);
-}
-static void
-set_ui_handler_input_region(int contents_height)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;xwin = elm_win_xwindow_get(vds.win);
-
-&nbsp;&nbsp;&nbsp;switch (vds.angle) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 0:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_input_region = set_window_region(0, contents_height,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vds.win_width, ELM_SCALE_SIZE(QP_HANDLE_H));
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 90:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_input_region = set_window_region(contents_height, 0,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ELM_SCALE_SIZE(QP_HANDLE_H), vds.win_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 180:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_input_region = set_window_region(
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, vds.win_height - contents_height - ELM_SCALE_SIZE(QP_HANDLE_H),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vds.win_width, ELM_SCALE_SIZE(QP_HANDLE_H));
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 270:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_input_region = set_window_region(
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vds.win_width - contents_height - ELM_SCALE_SIZE(QP_HANDLE_H),
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, ELM_SCALE_SIZE(QP_HANDLE_H), vds.win_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;atom_window_input_region = ecore_x_atom_get(STR_ATOM_WINDOW_INPUT_REGION);
-&nbsp;&nbsp;&nbsp;ecore_x_window_prop_card32_set(xwin, atom_window_input_region, window_input_region, 4);
-
-&nbsp;&nbsp;&nbsp;free(window_input_region);
-}
-static void
-set_ui_handler_content_region(int contents_height)
-{
-&nbsp;&nbsp;&nbsp;// Declare the variables
-
-&nbsp;&nbsp;&nbsp;xwin = elm_win_xwindow_get(vds.win);
-
-&nbsp;&nbsp;&nbsp;switch (vds.angle) 
-&nbsp;&nbsp;&nbsp;{
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 0:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_contents_region = set_window_region(0, 0,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vds.win_width, contents_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 90:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_contents_region = set_window_region(0, 0,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contents_height, vds.win_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 180:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_contents_region = set_window_region(
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;0, vds.win_height - contents_height, vds.win_width, contents_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;case 270:
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window_contents_region = set_window_region(
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vds.win_width - contents_height, 0,
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contents_height, vds.win_height);
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
-&nbsp;&nbsp;&nbsp;}
-
-&nbsp;&nbsp;&nbsp;// Error handling
-
-&nbsp;&nbsp;&nbsp;atom_window_contents_region = ecore_x_atom_get(STR_ATOM_WINDOW_CONTENTS_REGION);
-&nbsp;&nbsp;&nbsp;ecore_x_window_prop_card32_set(xwin, atom_window_contents_region, window_contents_region, 4);
-
-&nbsp;&nbsp;&nbsp;free(window_contents_region);
-}
-</pre>
-
-  
-  
-<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
-<script type="text/javascript" src="../scripts/showhide.js"></script>
-</div></div></div>
-
-<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
-
-<div id="footer">
-<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
-</div>
-
-<script type="text/javascript">
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', 'UA-25976949-1']);
-_gaq.push(['_trackPageview']);
-(function() {
-var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
-ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
-var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
-})();
-</script>
-
-</body>
-</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/mobile_n/sample_account_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/sample_account_sd_mn.htm
new file mode 100644 (file)
index 0000000..89df17e
--- /dev/null
@@ -0,0 +1,207 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+       <title>Sample Account Sample Overview</title>
+</head>
+
+<body class="no-toc" onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+</div> 
+
+<div id="container"><div id="contents"><div class="content">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../images/mobile_s_n.png"/></p>
+       </div>
+  <h1>Sample Account Sample Overview</h1>
+<p>The Sample Account application demonstrates how to implement an account provider which can add and configure an account. This application uses the <a href="../../../org.tizen.native.mobile.apireference/group__CAPI__ACCOUNT__MANAGER__MODULE.html">Account Manager</a> API to control the account.</p>
+
+<p>The following figure illustrates the main views of the Sample Account.</p>
+
+       <p class="figure">Figure: Sample Account views</p>
+       <p align="center"><img alt="Sample Account views" src="../images/account_sample_0.png" />
+  <img alt="Sample Account views" src="../images/account_sample_1.png" />
+</p>
+
+<p>The application main window consists of 2 screens:</p>
+  <ul>
+    <li>Sign in: Displays the account sign in view and handles adding a new account.</li>
+    <li>Configure: Displays the account information and setting for the selected account.</li>
+  </ul>
+  
+<h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privileges must be set:
+ <ul>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/account.read</span></li>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/account.write</span></li>
+ </ul>
+</p>  
+
+<h2>Implementation</h2>
+
+<p>To run this application, go to <strong>Settings &gt; Accounts</strong>. You can see <strong>SampleAccount</strong> on the Add account list.</p>
+
+<h3>Adding an  Account in the Sign In View</h3>
+
+<p>To add an account in the sign in view:</p>
+<ol>
+<li>
+<p>When the user clicks <strong>SIGN IN</strong> in the sign in view, the application adds an account with input text.</p>
+<p>The <span style="font-family: Courier New,Courier,monospace">account_create()</span> function is used to initialize the account manager handle, which is later used to set account data.</p>
+<pre class="prettyprint">
+int ret = 0;
+account_h account = NULL;
+
+// Create account handle
+ret = account_create(&amp;account);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;return;
+}
+</pre>
+</li>
+<li>
+<p>Set the user ID and password with the <span style="font-family: Courier New,Courier,monospace">account_set_user_name()</span> and <span style="font-family: Courier New,Courier,monospace">account_set_access_token()</span> functions.</p>
+<p>You can use various other <span style="font-family: Courier New,Courier,monospace">account_set_XXX()</span> account data functions too. For more information, see the <a href="../../../org.tizen.native.mobile.apireference/group__CAPI__ACCOUNT__MANAGER__MODULE.html">Account Manager</a> API.</p>
+<pre class="prettyprint">
+const char *user_name = NULL, *password = NULL;
+
+// Set account data
+ret = account_set_user_name(account, user_name);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;return;
+}
+
+ret = account_set_access_token(account, password);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;return;
+}
+</pre>
+</li>
+<li>
+<p>Once the account data has been set, insert data to the account database. The <span style="font-family: Courier New,Courier,monospace">account_insert_to_db()</span> function uses the account ID as the second parameter.</p>
+<pre class="prettyprint">
+int account_id = 0;
+
+// Insert data to the database
+ret = account_insert_to_db(account, &amp;account_id);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;return;
+}
+</pre>
+</li>
+<li>
+<p>When no longer needed, release the account handle with the <span style="font-family: Courier New,Courier,monospace">account_destroy()</span> function:</p>
+<pre class="prettyprint">
+// Release account handle
+ret = account_destroy(account);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;return;
+}
+</pre>
+</li>
+</ol>
+
+<h3>Getting an Account in the Configure View</h3>
+
+<p>To get an account in the configure view:</p>
+<ol>
+<li>
+<p>When the user selects the account that has been added to the account list, the account ID is handed to the application.</p>
+<p>Use the account ID to get the account data with the <span style="font-family: Courier New,Courier,monospace">account_query_account_by_account_id()</span> function.</p>
+<pre class="prettyprint">
+int account_id = handed_value;
+account_h account = NULL;
+int ret = 0;
+
+// Create the account with account_create()
+
+// Get account data with account_id
+ret = account_query_account_by_account_id(account_id, &amp;account);
+
+if (ret != ACCOUNT_ERROR_NONE)
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+}</pre>
+</li>
+<li>
+<p>Get the user ID with the <span style="font-family: Courier New,Courier,monospace">account_get_user_name()</span> function.</p>
+<p>If you added more account data during the account creation, you can access that with various <span style="font-family: Courier New,Courier,monospace">account_get_XXX()</span> functions.</p>
+<pre class="prettyprint">
+// Get user ID from account data
+ret = account_get_user_name(account, &amp;account_user_id);
+
+if (ret != ACCOUNT_ERROR_NONE) 
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+}
+
+// Destroy the account with account_destroy()
+</pre>
+</li>
+</ol>
+
+<h3>Deleting an Account in the Configure View</h3>
+
+<p>When the user clicks <strong>Sign out</strong> in the configure view, the selected account is removed from the account database.</p>
+<p>To delete an account, use the <span style="font-family: Courier New,Courier,monospace">account_delete_from_db_by_id()</span> function with the account ID.</p>
+<p>There are several <span style="font-family: Courier New,Courier,monospace">account_delete_XXX()</span> functions provided for deleting an account. For more information, see the <a href="../../../org.tizen.native.mobile.apireference/group__CAPI__ACCOUNT__MANAGER__MODULE.html">Account Manager</a> API.</p>
+<pre class="prettyprint">
+int account_id = handed_value;
+int ret = 0;
+
+// Remove the current account
+ret = account_delete_from_db_by_id(account_id);
+
+if (ret != ACCOUNT_ERROR_NONE) 
+{
+&nbsp;&nbsp;&nbsp;// Error handling
+}
+</pre>
+  
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/mobile_n/thumbnail_util_sd_mn.htm b/org.tizen.sampledescriptions/html/mobile_n/thumbnail_util_sd_mn.htm
new file mode 100644 (file)
index 0000000..fd7ce4b
--- /dev/null
@@ -0,0 +1,115 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+       <title>Thumbnail Util Sample Overview</title>
+</head>
+
+<body class="no-toc" onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+</div> 
+
+<div id="container"><div id="contents"><div class="content">
+       <div id="profile">
+               <p><img alt="Mobile native" src="../images/mobile_s_n.png"/></p>
+       </div>
+  <h1>Thumbnail Util Sample Overview</h1>
+<p>The Thumbnail Util sample application demonstrates how to get a custom-size thumbnail image.</p>
+<p>The following figure illustrates the main view and structure of the Thumbnail Util application.
+</p>
+
+  <p class="figure">Figure: Thumbnail Util main view and structure</p>
+  <p align="center">
+    <img alt="Thumbnail Util main view" src="../images/thumbnail_util_sd_mn.png" /> <img alt="Thumbnail Util tree" src="../images/thumbnail_util_tree_sd_mn.png" />
+  </p>
+
+<h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privilege must be set:</p>
+<ul>
+<li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/mediastorage</span>
+</li>
+</ul>
+  
+  
+<h2>Implementation</h2>
+
+<p>To generate a thumbnail:</p>
+<ol>
+<li>Create a thumbnail using input values in the <span style="font-family: Courier New,Courier,monospace">gen_clicked_cb()</span> function:
+<pre class="prettyprint">
+static void 
+gen_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+{
+&nbsp;&nbsp;&nbsp;thumbnail_util_create(&amp;thumb);
+&nbsp;&nbsp;&nbsp;thumbnail_util_set_size(thumb, width, height);
+&nbsp;&nbsp;&nbsp;thumbnail_util_set_path(thumb, full_path);
+&nbsp;&nbsp;&nbsp;ret = thumbnail_util_extract(thumb, thumbnail_completed_cb, NULL, &amp;job_id);
+&nbsp;&nbsp;&nbsp;if (ret != THUMBNAIL_UTIL_ERROR_NONE) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;// Error handling
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;thumbnail_util_destroy(thumb);
+}
+</pre>
+</li>
+<li>Display the created thumbnail. 
+<p>When the requested thumbnail creation is completed, the <span style="font-family: Courier New,Courier,monospace">thumbnail_completed_cb()</span> function is invoked.</p>
+<p>You can save the thumbnail to a file, or show it in the window using the returned value. In this example, save the result and display the thumbnail image with returned values.</p>
+<pre class="prettyprint">
+{
+&nbsp;&nbsp;&nbsp;if (thumbnail == NULL) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thumbnail = elm_image_add(cbox);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;evas_object_size_hint_align_set(thumbnail, EVAS_HINT_FILL, EVAS_HINT_FILL);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;evas_object_size_hint_weight_set(thumbnail, 0.7, EVAS_HINT_EXPAND);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;elm_box_pack_before(cbox, thumbnail, thumbnail_info);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;snprintf(file_path, sizeof(file_path), &quot;%s/%s&quot;, image_dir, file_name);
+&nbsp;&nbsp;&nbsp;image_util_encode_jpeg(raw_data, raw_width, raw_height, IMAGE_UTIL_COLORSPACE_BGRA8888, 100, file_path);
+&nbsp;&nbsp;&nbsp;elm_image_file_set(thumbnail, file_path, NULL);
+&nbsp;&nbsp;&nbsp;evas_object_show(thumbnail);
+
+&nbsp;&nbsp;&nbsp;snprintf(result, sizeof(result), 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot;&lt;font_size=30&gt;&lt;p align=center&gt;&lt;b&gt;Thumbnail Info&lt;/b&gt;&lt;/p&gt;&lt;br&gt;&lt;br&gt; req_id  [%s]&lt;br&gt; width  [%d]&lt;br&gt; height  [%d]&lt;br&gt; size  [%d]&lt;/font/&gt;&quot;, 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request_id, raw_width, raw_height, raw_size);
+&nbsp;&nbsp;&nbsp;elm_object_text_set(thumbnail_info, result);
+&nbsp;&nbsp;&nbsp;evas_object_show(thumbnail_info); 
+}
+</pre>
+</li>
+</ol>
+  
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/mobile_w/flashlight_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/flashlight_mw.htm
new file mode 100644 (file)
index 0000000..e725604
--- /dev/null
@@ -0,0 +1,215 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>Flashlight Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       
+       <div id="toc_border">
+       <div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                  <li><a href="../../../org.tizen.guides/html/web/tizen/system/system_info_w.htm">System Information Guide</a></li> 
+                  <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html">System Information API</a></li>
+               </ul>
+       </div>
+       </div>
+</div> 
+
+<div id="container">
+<div id="contents">
+<div class="content">
+  <h1>Flashlight Sample Overview</h1> 
+  <p>The Flashlight sample application demonstrates how you can let the user to switch on the LED diode (camera flash) on the device.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the Flashlight.</p> 
+  <p class="figure">Figure: Flashlight screen</p>
+  <p align="center"><img src="../images/flashlight_screens.png" alt="Flashlight screen"/></p>
+  <p>The application opens with the main screen that displays a switch and the current state of the LED. You can switch the LED on or off with the switch.</p>
+
+  <h2>Prerequisites</h2> 
+  <p>To ensure proper application execution, the following privilege must be set:</p>
+  <ul><li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/led</span></li></ul>
+  
+  <h2>Source Files</h2> 
+  <p>You can create and view the sample application project including the source files in the IDE.</p>   
+  
+  <p>The application uses a simple MV (Model View) architecture, where the core part determines the architecture and the app part determines the application behavior. The <span style="font-family: Courier New,Courier,monospace">core.js</span> file implements a simple AMD (Asynchronous Module Definition) and specifies module defining.</p>
+  
+  <table border="1"> 
+   <tbody> 
+    <tr> 
+     <th>File name</th> 
+     <th>Description</th> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td> 
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td> 
+    </tr> 
+        <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">ccs/</span></td> 
+     <td>This directory contains the CSS styling for the application UI.</td> 
+    </tr>      
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td> 
+     <td>This is a starting file from which the application starts loading. It also contains the layout of the application screens.</td> 
+    </tr>
+       <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/</span></td> 
+     <td>This directory contains the application code.</td> 
+    </tr>      
+
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/core</span></td> 
+     <td>This directory contains the application framework.</td> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/models</span></td> 
+     <td>This directory contains the application model modules.</td> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/views/</span></td> 
+     <td>This directory contains the files implementing the application views.</td> 
+    </tr>      
+   </tbody> 
+  </table> 
+  
+<h2>Implementation</h2>
+
+<h3>Application Layout</h3>
+<p>The application consists of only one page defined in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file. The page layout has a header with a title and a switch control in the middle of the page:</p>
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div id=&quot;main&quot; class=&quot;ui-page&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-header&quot;&gt;&lt;h2&gt;Flashlight&lt;/h2&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;checkbox&quot; id=&quot;switch&quot; class=&quot;ui-toggleswitch&quot; disabled&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;switch&quot;&gt;Off&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;flash-unavailable-popup&quot; class=&quot;ui-popup&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Warning&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content popup-content-padding&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The LED diode is not available on this device. The application
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;will be closed.
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a class=&quot;ui-btn&quot; data-rel=&quot;back&quot; data-inline=&quot;true&quot;&gt;OK&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;</pre>
+
+<h3>Flashlight State Change</h3>
+
+<p>To allow the user to switch the LED on or off:</p>
+
+<ol>
+<li>During the application initialization, check whether the LED diode (camera flash) is available and retrieve a camera flash object that allows you to control the LED.
+
+<pre class="prettyprint">
+/* js/models/cameraFlash.js */
+var flashObject = null;
+
+function init() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Check whether the LED diode is available */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var flashAvailable = tizen.systeminfo.getCapability(&#39;http://tizen.org/feature/camera.back.flash&#39;) || 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systeminfo.getCapability(&#39;http://tizen.org/feature/camera.front.flash&#39;);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (flashAvailable) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Request for the camera flash object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue(&#39;CAMERA_FLASH&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function onGetPropertySucceed(flash) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashObject = flash;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function onGetPropertyError() {});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do something */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (e) {}
+}</pre>
+</li>
+<li>To switch on the LED diode, define the <span style="font-family: Courier New,Courier,monospace">turnOn()</span> method. 
+<p>The <span style="font-family: Courier New,Courier,monospace">setBrightness()</span> method of the camera object takes the brightness value as a numeric input parameter (0-1). If the value is 0, the LED diode is switched off. If the value is 1, the diode shines with a maximum brightness.</p>
+
+<pre class="prettyprint">
+/* js/models/cameraFlash.js */
+function turnOn() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashObject.setBrightness(1);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (e) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(e);
+&nbsp;&nbsp;&nbsp;}
+}</pre>
+</li>
+<li>To switch off the LED diode, define the <span style="font-family: Courier New,Courier,monospace">turnOff()</span> method:
+
+<pre class="prettyprint">
+function turnOff() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashObject.setBrightness(0);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (e) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(e);
+&nbsp;&nbsp;&nbsp;}
+}</pre>
+</li>
+</ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div>
+</div>
+</div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/jpegexifeditor_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/jpegexifeditor_mw.htm
new file mode 100644 (file)
index 0000000..2825fed
--- /dev/null
@@ -0,0 +1,451 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>JPEGExifEditor Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       
+       <div id="toc_border">
+       <div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                  <li><a href="../../../org.tizen.guides/html/web/tizen/content/exif_w.htm">Exif Guide</a></li> 
+           <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/exif.html">Exif API</a></li>   
+               </ul>
+       </div>
+       </div>
+</div> 
+
+<div id="container">
+<div id="contents">
+<div class="content">
+  <h1>JPEGExifEditor Sample Overview</h1> 
+  <p>The JPEGExifEditor sample application demonstrates how you can browse JPEG images stored on device and read and edit the Exif data of these images.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screens of the JPEGExifEditor.</p>
+  <p class="figure">Figure: JPEGExifEditor screens</p>
+  <p align="center"><img src="../images/jpegexifeditor_mw.png" alt="JPEGExifEditor screens"/></p>
+<p>The application opens with the main screen, which shows a list of JPEG images found on the device.</p>
+<p>If you click on a list item, the Exif screen is displayed, showing the current Exif data of the selected image. To edit the data, modify the values and click <strong>Save</strong>.</p>
+
+<p>The following Exif data is displayed:</p>
+<ul>
+  <li>Width</li>
+  <li>Height</li>
+  <li>Manufacturer</li>
+  <li>Model</li>
+  <li>Date</li>
+  <li>Orientation</li>
+  <li>Focal ratio</li>
+  <li>ISO speed</li>
+  <li>Exposure time</li>
+  <li>Exposure program</li>
+  <li>Focal length</li>
+  <li>White balance</li>
+  <li>Latitude</li>
+  <li>Longitude</li>
+  <li>Altitude</li>
+  <li>GPS processing method</li>
+  <li>GPS time and user comment</li>
+</ul>
+
+
+<h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privileges must be set:</p>
+<ul>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/content.write</span></li>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/content.read</span></li>
+</ul>
+
+<h2>Source Files</h2> 
+<p>You can create and view the sample application project including the source files in the IDE.</p>
+<p>The application uses a simple MV (Model View) architecture, where the core part determines the architecture and the app part determines the application behavior. The <span style="font-family: Courier New,Courier,monospace">core.js</span> file implements a simple AMD (Asynchronous Module Definition) and specifies module defining.</p>   
+  <table border="1"> 
+   <tbody> 
+    <tr> 
+     <th>File name</th> 
+     <th>Description</th> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td> 
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td> 
+    </tr> 
+        <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">ccs/</span></td> 
+     <td>This directory contains the CSS styling for the application UI.</td> 
+    </tr> 
+
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td> 
+     <td>This is a starting file from which the application starts loading. It also contains the layout of the application screens.</td> 
+    </tr>
+       <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/</span></td> 
+     <td>This directory contains the application code.</td> 
+    </tr>      
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/core</span></td> 
+     <td>This directory contains application framework.</td> 
+    </tr> 
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">js/helpers</span></td>
+      <td>This directory contains the helper functions used by the view and model modules.</td>
+    </tr>    
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/models</span></td> 
+     <td>This directory contains the application model modules.</td> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/views/</span></td> 
+     <td>This directory contains the files implementing the application views.</td> 
+    </tr>
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">templates/</span></td>
+      <td>This directory contains the templates for the list items.</td>
+    </tr>      
+   </tbody> 
+  </table> 
+  
+<h2>Implementation</h2>
+
+
+<h3>Defining the Application Layout</h3>
+<p>The application contains 2 screens that are defined in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file:</p>
+<ul>
+<li>Main screen displays a list of JPEG images found on the device.
+<p>The main screen layout consists of a header and an image list:</p>
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;chooseImage&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div data-role=&quot;header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Choose an image file&lt;/h1&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div data-role=&quot;content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p id=&quot;noImagesMsg&quot; class=&quot;hidden&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;No images were found on the device
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;imagesList&quot; class=&quot;ui-listview&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;</pre>
+
+<p>The list content is generated from the <span style="font-family: Courier New,Courier,monospace">templates/imageFile.tpl</span> template file:</p>
+<pre class="prettyprint">
+&lt;!--templates/imageFile.tpl--&gt;
+{{#images}}
+&lt;li class=&quot;ui-li-has-multiline&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;a  href=&quot;#edit&quot; data-uri=&quot;{{this.path}}&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div  class=&quot;title&quot;&gt;{{this.title}}&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;span  class=&quot;ui-li-text-sub&quot;&gt;{{this.path}}&lt;/span&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img  src=&quot;{{this.thumbnailPath}}&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;/a&gt;
+&lt;/li&gt;
+{{/images}}</pre>
+</li>
+<li>Exif screen displays a form that contains EXIF properties loaded for the selected image file.
+<p>The Exif screen layout consists of a header with the file name, an Exif property list, and a footer with a <strong>Save</strong> button:</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page&quot; id=&quot;edit&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;&lt;/h1&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Width&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;width&quot; type=&quot;number&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Height&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;height&quot; type=&quot;number&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Camera manufacturer&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;manufacturer&quot; type=&quot;text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Camera model&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;model&quot; type=&quot;text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Creation date&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;date&quot; type=&quot;date&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Orientation&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select data-native-menu=&quot;true&quot; id=&quot;orientation&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;NORMAL&quot;&gt;Normal&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;ROTATE_90&quot;&gt;Rotate 90&amp;deg;&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;ROTATE_180&quot;&gt;Rotate 180&amp;deg;&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;ROTATE_270&quot;&gt;Rotate 270&amp;deg;&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;FLIP_VERTICAL&quot;&gt;Flip vertical&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;FLIP_HORIZONTAL&quot;&gt;Flip horizontal&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;TRANSPOSE&quot;&gt;Transpose&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;TRANSVERSE&quot;&gt;Transverse&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/select&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;fNumber&quot;&gt;Focal ratio&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;fNumber&quot; type=&quot;text&quot; data-validate=&quot;double&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;ISO speed&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;isoSpeed&quot; class=&quot;ui-listview&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button id=&quot;addIsoSpeedElement&quot;&gt;Add element&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Exposure time&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;exposureTime&quot; type=&quot;text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;Exposure program&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select data-native-menu=&quot;true&quot; id=&quot;exposureProgram&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;NOT_DEFINED&quot;&gt;Not defined&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;MANUAL&quot;&gt;Manual&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;NORMAL&quot;&gt;Normal&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;APERTURE_PRIORITY&quot;&gt;Aperture priority&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;SHUTTER_PRIORITY&quot;&gt;Shutter priority&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;CREATIVE_PROGRAM&quot;&gt;Creative program&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;ACTION_PROGRAM&quot;&gt;Action program&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;PORTRAIT_MODE&quot;&gt;Portrait mode&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;LANDSCAPE_MODE&quot;&gt;Landscape mode&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/select&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;focalLength&quot;&gt;Focal length&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;focalLength&quot; type=&quot;text&quot; data-validate=&quot;double&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;White balance&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;select data-native-menu=&quot;true&quot; id=&quot;whiteBalance&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;AUTO&quot;&gt;Auto&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;option value=&quot;MANUAL&quot;&gt;Manual&lt;/option&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/select&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;latitude&quot;&gt;Latitude&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;latitude&quot; type=&quot;text&quot; data-validate=&quot;double&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;longitude&quot;&gt;Longitude&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;longitude&quot; type=&quot;text&quot; data-validate=&quot;double&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;label for=&quot;altitude&quot;&gt;Altitude&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;altitude&quot; type=&quot;text&quot; data-validate=&quot;double&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;GPS processing method&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;gpsProcessingMethod&quot; type=&quot;text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;GPS time&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;gpsDateTime&quot; type=&quot;date&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li data-role=&quot;list-divider&quot;&gt;User comment&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;textarea id=&quot;userComment&quot;&gt;&lt;/textarea&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button id=&quot;save&quot;&gt;Save&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;</pre>  
+
+<p>The screen also contains 3 popups: save succeeded message, operation failed message, and validation error message:</p>
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div id=&quot;saveSucceededPopup&quot; data-role=&quot;notification&quot; data-type=&quot;popup&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-interval=&quot;3000&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Saved successfully&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&lt;div id=&quot;saveFailedPopup&quot; data-role=&quot;notification&quot; data-type=&quot;popup&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-interval=&quot;3000&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;p&gt;Operation failed: &lt;span id=&quot;errorMessage&quot;&gt;&lt;/span&gt;&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&lt;div id=&quot;invalidFields&quot; data-role=&quot;popup&quot; class=&quot;center_title_1btn&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-title&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h1&gt;Validation error&lt;/h1&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Please correct values in the following fields:
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;invalidFieldsList&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-button-bg&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a data-role=&quot;button&quot; data-rel=&quot;back&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-inline=&quot;true&quot;&gt;OK&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt; </pre>
+
+<p>The ISO speed element creates a list of numeric values. The list is defined by the <span style="font-family: Courier New,Courier,monospace">&lt;ul&gt;</span> element, and its content is generated using the <span style="font-family: Courier New,Courier,monospace">templates/isoSpeed.tpl</span> template:</p>
+<pre class="prettyprint">
+&lt;!--templates/isoSpeed.tpl--&gt;
+&lt;li class=&quot;ui-li-has-right-btn&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;input-container&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input type=&quot;number&quot; value=&quot;{{value}}&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;&nbsp;&nbsp;&lt;div data-role=&quot;button&quot; data-inline=&quot;true&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-icon=&quot;delete&quot; data-style=&quot;circle&quot;&gt;&lt;/div&gt;
+&lt;/li&gt; </pre>
+
+</li>
+</ul>
+
+<h3>Finding JPEG Images on the Device</h3>
+<p>To find all JPEG images stored in the device media database:</p>
+<ol>
+  <li>Define the <span style="font-family: Courier New,Courier,monospace">getImages()</span> method that finds the JPEG images.</li>
+  <li>Inside the <span style="font-family: Courier New,Courier,monospace">getImages()</span> method, call the <span style="font-family: Courier New,Courier,monospace">find()</span> method of the <a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/content.html">Content</a> API. To limit the image search define a suitable <span style="font-family: Courier New,Courier,monospace">AttributeFilter</span> as a parameter.</li>
+  <li>Define the <span style="font-family: Courier New,Courier,monospace">onContentFound()</span> callback.</li>
+  <li><p>After the images files have been found, they are transformed into an object array of the following structure:</p>
+<pre class="prettyprint">
+{
+&nbsp;&nbsp;&nbsp;title: {string} – title of the image
+&nbsp;&nbsp;&nbsp;path: {string} – absolute path of the image
+&nbsp;&nbsp;&nbsp;thumbnailPath: {string|null} – absolute path of the thumbnail image or null
+}</pre></li>
+<li><p>The  <span style="font-family: Courier New,Courier,monospace">comparePaths()</span> method sorts the result array by the image path:</p>
+<pre class="prettyprint">
+function comparePaths(file1, file2) 
+{
+&nbsp;&nbsp;&nbsp;return file1.path.localeCompare(file2.path);
+}</pre></li>
+</ol>
+<p>The <span style="font-family: Courier New,Courier,monospace">getImages()</span> method returns an array of JPEG images found on the device. If the <span style="font-family: Courier New,Courier,monospace">getImages()</span> method executes successfully, the <span style="font-family: Courier New,Courier,monospace">onSuccess</span> callback is called with a list of found content files. Otherwise, the <span style="font-family: Courier New,Courier,monospace">onError</span> callback is called.</p>
+<pre class="prettyprint">
+/* modules/exif.js */
+function getImages(onSuccess, onError) 
+{
+&nbsp;&nbsp;&nbsp;tizen.content.find(function onContentFound(contents) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var result = [], content = null, i = 0;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; contents.length; i += 1) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;content = contents[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.push(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;title: content.title,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;path: content.contentURI,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;thumbnailPath: content.thumbnailURIs.length ? content.thumbnailURIs[0] : null
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onSuccess(result.sort(comparePaths));
+&nbsp;&nbsp;&nbsp;}, onError, null,
+&nbsp;&nbsp;&nbsp;new tizen.AttributeFilter(&#39;mimeType&#39;, &#39;EXACTLY&#39;, &#39;image/jpeg&#39;));
+}</pre>
+
+<h3 id="read">Reading Exif Information</h3>
+<p>To get the Exif information, use the <span style="font-family: Courier New,Courier,monospace">getExifInfo</span> method from the Exif API:</p>
+<pre class="prettyprint">
+/* models/exif.js */
+function readExifInfo(imageUri, onSuccess, onError) 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.exif.getExifInfo(imageUri, onSuccess, onError);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (e) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(e);
+&nbsp;&nbsp;&nbsp;}
+}</pre>
+<p>If the <span style="font-family: Courier New,Courier,monospace">imageUri</span> parameter is correct, the <span style="font-family: Courier New,Courier,monospace">onSuccess</span> callback is called with the <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> object as an input parameter. If the specified JPEG file does not exists or has no EXIF data, the <span style="font-family: Courier New,Courier,monospace">onError</span> callback is executed instead.</p>
+
+<h3>Writing Exif Information</h3>
+<p>To write the Exif information to a file, you need an <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> object. This object can be created from scratch or <a href="#read">obtained from the JPEG image</a>.</p>
+<p>To write Exif information:</p>
+<ol>
+  <li>Prepare the <span style="font-family: Courier New,Courier,monospace">tizen.ExifInformation</span> instance to be written. 
+  <p>To create an <span style="font-family: Courier New,Courier,monospace">tizen.ExifInformation</span> object from scratch, create an empty instance with the <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> constructor. The constructor takes an image URI as an input parameter, creates an empty <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> object, and sets the specified image URI to this object.</p>
+<pre class="prettyprint">
+/* models/exif.js */
+function createExifInfo(imageUri) 
+{
+&nbsp;&nbsp;&nbsp;var exifInfo = new tizen.ExifInformation();
+&nbsp;&nbsp;&nbsp;exifInfo.uri = imageUri;
+&nbsp;&nbsp;&nbsp;return exifInfo;
+}</pre> 
+    </li>
+    <li>When you have access to the <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> object (you have created it from scratch or retrieved it from an image file), you can overwrite its fields.
+<p>Save the modified <span style="font-family: Courier New,Courier,monospace">ExifInformation</span> object with the <span style="font-family: Courier New,Courier,monospace">tizen.exif.saveExifInfo</span> method:</p>
+<pre class="prettyprint">
+/* models/exif.js */
+function saveExifInfo(exifInfo, onSuccess, onError) 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.exif.saveExifInfo(exifInfo, onSuccess, onError);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (e) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(e);
+&nbsp;&nbsp;&nbsp;}
+}</pre>    
+ </li>
+</ol>
+
+
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div>
+</div>
+</div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/memo_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/memo_mw.htm
new file mode 100644 (file)
index 0000000..b01d7a0
--- /dev/null
@@ -0,0 +1,189 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>Memo Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+            <li><a href="../../../org.tizen.guides/html/web/tizen/content/content_w.htm">Content Guide</a></li> 
+                       <li><a href="../../../org.tizen.guides/html/web/w3c/storage/websql_w.htm">Web SQL Database Guide</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/content.html">Content API</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#sql">Web SQL Database API</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>Memo Sample Overview</h1>
+  <p>The Memo sample application demonstrates how you can use the Web SQL database and content features in your application to store dates and get content information.</p> 
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screens of the Memo.</p>
+  <p class="figure">Figure: Memo screens</p>
+  <p align="center"><img alt="Memo screens" src="../images/memo.png" /></p>
+  <p>The application opens with the main screen that shows the memos included in the default book.</p> 
+
+<h2>Prerequisites</h2>  
+<p>To ensure proper application execution, the following privileges must be set:</p>
+<ul><li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/content.read</span></li>
+<li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/content.write</span></li></ul>
+  
+  <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p> 
+  <table border="1">
+   <tbody>
+    <tr>
+     <th>File name</th>
+     <th>Description</th>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+     <td>This file contains the code for initiating the memo application.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/memo_db.js</span></td>
+     <td>This file contains the code for handling the memo database.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/memo_gallery.js</span></td>
+     <td>This file contains the code for handling the gallery from device images.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/memo_page.js</span></td>
+     <td>This file contains the code for handling page navigation.</td>
+    </tr>
+   </tbody>
+  </table>
+
+<h2>Implementation</h2>
+
+<p>To implement the application:</p>
+
+<ol><li>
+<p>To initialize the application, use the <span style="font-family: Courier New,Courier,monospace">init()</span> method, which is called when the whole DOM content is loaded. The method calls 3 other methods: <span style="font-family: Courier New,Courier,monospace">openDB()</span>, <span style="font-family: Courier New,Courier,monospace">initEventhandler()</span>, and <span style="font-family: Courier New,Courier,monospace">initPage()</span>.</p>
+<pre class="prettyprint">
+function init()
+{
+&nbsp;&nbsp;&nbsp;openDB();
+&nbsp;&nbsp;&nbsp;initEventhandler();
+&nbsp;&nbsp;&nbsp;initPage();
+}
+</pre></li>
+
+<li>
+<p>The <span style="font-family: Courier New,Courier,monospace">openDB()</span> method opens the Web SQL database and calls the <span style="font-family: Courier New,Courier,monospace">createTable()</span> method:</p>
+<pre class="prettyprint">
+function openDB() 
+{
+&nbsp;&nbsp;&nbsp;if (window.openDatabase) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;db = window.openDatabase(&quot;myMemoDB&quot;, &quot;1.0&quot;, &quot;for memo sample webapp&quot;, 1024*1024);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.warn(&quot;not web sql support&quot;);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;createTable();
+}
+</pre></li>
+<li>To create the table, define the SQL sentence with quotation marks as the <span style="font-family: Courier New,Courier,monospace">executeSql()</span> method parameter.
+<p>The <span style="font-family: Courier New,Courier,monospace">db</span> variable handles database transactions.</p>
+
+<pre class="prettyprint">
+db.transaction(function (tx) 
+{
+&nbsp;&nbsp;&nbsp;tx.executeSql(&quot;CREATE TABLE IF NOT EXISTS memo (id INTEGER PRIMARY KEY AUTOINCREMENT,&quot; +
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&quot; subject, text, book, date, image)&quot;, []);
+});
+</pre></li>
+
+<li>To manage the table, you can insert values to it, or delete it:
+<pre class="prettyprint">
+/* Insert values */
+db.transaction(function (tx) 
+{
+&nbsp;&nbsp;&nbsp;tx.executeSql(&quot;INSERT INTO book VALUES(?)&quot;, [book]);
+});
+
+/* Delete the table */
+db.transaction(function (tx) 
+{
+&nbsp;&nbsp;&nbsp;tx.executeSql(&quot;DROP TABLE memo&quot;, []);
+});
+</pre></li>
+
+<li>
+<p>To request for the content with a specific filter, use the <span style="font-family: Courier New,Courier,monospace">refreshGalleries()</span> function. You can sort the content with the <span style="font-family: Courier New,Courier,monospace">tizen.SortMode</span> object.</p>
+<pre class="prettyprint">
+var refreshed = false,
+&nbsp;&nbsp;&nbsp;&nbsp;filter = new tizen.AttributeFilter( &#39;type&#39;, &#39;EXACTLY&#39;, &#39;IMAGE&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;sortMode = new tizen.SortMode(&#39;title&#39;, &#39;ASC&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;RESOURCE_PATH = &#39;/opt/usr/media/&#39;;
+
+function refreshGalleries() 
+{
+&nbsp;&nbsp;&nbsp;refreshed = false;
+&nbsp;&nbsp;&nbsp;tizen.content.find(contentFindSuccess, contentFindError, null, filter, sortMode);
+}
+</pre>
+<p>The <span style="font-family: Courier New,Courier,monospace">contentFindSuccess()</span> function is a callback that is triggered after the  <span style="font-family: Courier New,Courier,monospace">find()</span> function has retrieved the content. The callback extracts all image paths from a specified path, and store an array for making a gallery.</p>
+<pre class="prettyprint">
+for (i = 0; i &lt; length; i += 1) 
+{
+&nbsp;&nbsp;&nbsp;item = items[i];
+&nbsp;&nbsp;&nbsp;pathdata = extractPathData(item.contentURI);
+&nbsp;&nbsp;&nbsp;item.path = pathdata.path;
+&nbsp;&nbsp;&nbsp;item.resource = pathdata.resource;
+&nbsp;&nbsp;&nbsp;item.directory = pathdata.directory;
+&nbsp;&nbsp;&nbsp;allpath = &quot;file://&quot; + item.path + &quot;/&quot; + item.name;
+&nbsp;&nbsp;&nbsp;array_allpath.push(allpath);
+}
+</pre></li></ol>
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/mirror_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/mirror_mw.htm
new file mode 100644 (file)
index 0000000..6b4856a
--- /dev/null
@@ -0,0 +1,124 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>Mirror Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../org.tizen.guides/html/web/w3c/media/getusermedia_w.htm">getUserMedia Guide</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#getusermedia">getUserMedia API</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#audio">HTML5 audio element API</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#video">HTML5 video element API</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>Mirror Sample Overview</h1>
+  <p>The Mirror sample application demonstrates how you can use the front camera in your application.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the Mirror.</p>
+  <p class="figure">Figure: Mirror screen</p>
+  <p align="center"><img alt="Mirror screen" src="../images/mirror_mw.png" /> </p>
+  <p>The application opens with a main screen that shows an image from the front camera.</p>
+
+    <h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privilege must be set:</p>
+  <ul>
+    <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/mediacapture</span></li>
+  </ul>
+
+    <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p>         
+    <table border="1">
+    <tbody>
+      <tr>
+        <th>File name</th>
+        <th>Description</th>
+      </tr>
+      <tr>
+        <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+        <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+      </tr>
+      <tr>
+        <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+        <td>This file contains the CSS styling for the application UI.</td>
+      </tr>
+      <tr>
+        <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+        <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+      </tr>
+      <tr>
+        <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+        <td>This file contains the code for handling the main functionality of the application.</td>
+      </tr>
+    </tbody>
+  </table>
+
+<h2>Implementation</h2>
+<p>To use the camera:</p>
+<ol>
+<li><p>Initialize the camera with getUserMedia:</p>
+<pre class="prettyprint">
+if (navigator.getUserMedia) 
+{
+&nbsp;&nbsp;&nbsp;navigator.getUserMedia({video: true}, streamCb,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function(err) {console.log(err);});
+} 
+else 
+{
+&nbsp;&nbsp;&nbsp;return false;
+}
+</pre></li>
+<li><p>Link the camera stream to a video element and start to play:</p>
+<pre class="prettyprint">
+var URL = window.URL || window.webkitURL,
+&nbsp;&nbsp;&nbsp;&nbsp;objVideo = document.querySelector(&quot;#videoMirror&quot;);
+
+objVideo.src = URL.createObjectURL(stream);
+objVideo.play();
+</pre></li>
+</ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/morse_code_flashlight_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/morse_code_flashlight_mw.htm
new file mode 100644 (file)
index 0000000..f4644ba
--- /dev/null
@@ -0,0 +1,293 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>Morse Code Flashlight Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       
+       <div id="toc_border">
+       <div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                  <li><a href="../../../org.tizen.guides/html/web/tizen/system/system_info_w.htm">System Information Guide</a></li> 
+                  <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html">System Information API</a></li>  
+               </ul>
+       </div>
+       </div>
+</div> 
+
+<div id="container">
+<div id="contents">
+<div class="content">
+  <h1>Morse Code Flashlight Sample Overview</h1> 
+  <p>The Morse Code Flashlight sample application demonstrates how you can send messages in Morse code using a flashlight (the camera flash LED diode).</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the Morse Code Flashlight.</p>
+  <p class="figure">Figure: Morse Code Flashlight screen</p>
+  <p align="center"><img src="../images/morsecodeflashlight.png" alt="Morse Code Flashlight screen"/></p>
+<p>The application opens with the main screen, where you can enter the message text.</p>
+
+<p>To send a message, enter the text to the input field and click <strong>Encode</strong>. The application starts sending the encoded message by flashlight. To switch the flashlight instantly off, click <strong>STOP</strong>.</p>
+
+<h2>Prerequisites</h2>
+<ul>
+<li>Device must have at least one flashlight.</li>
+<li>To ensure proper application execution, the following privilege must be set:
+<ul><li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/led</span></li></ul></li>
+</ul>
+<h2>Source Files</h2> 
+<p>You can create and view the sample application project including the source files in the IDE.</p>   
+  <table border="1"> 
+   <tbody> 
+    <tr> 
+     <th>File name</th> 
+     <th>Description</th> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td> 
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td> 
+    </tr> 
+        <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">ccs/</span></td> 
+     <td>This directory contains CSS (Cascading Style Sheets) files used in  the application.</td> 
+    </tr> 
+
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td> 
+     <td>This is a starting file from which the application starts loading. It also contains the layout of the application screens.</td> 
+    </tr>
+       <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/</span></td> 
+     <td>This directory contains the application code.</td> 
+    </tr>      
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">js/app.js</span></td>
+      <td>This file handles the configuration values and initializes the application.</td>
+    </tr>
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/core</span></td> 
+     <td>This directory contains the application framework.</td> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/models</span></td> 
+     <td>This directory contains the application model modules.</td> 
+    </tr> 
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">js/models/flash.js</span></td>
+      <td>This file contains the methods that handle the flashlight data.</td>
+    </tr>
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">js/models/morseTranslator.js</span></td>
+      <td>This file contains the method that translates letters into Morse code.</td>
+    </tr>
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/views/</span></td> 
+     <td>This directory contains the files implementing the application views.</td> 
+    </tr>
+    <tr>
+      <td><span style="font-family: &quot;Courier New&quot;, Courier, monospace">js/views/main.js</span></td>
+      <td>This file contains  the main page UI.</td>
+    </tr>
+    <tr>
+      <td><span style="font-family: Courier New,Courier,monospace">style.css</span></td>
+      <td>This file contains the CSS styling for the application UI.</td>
+    </tr>      
+   </tbody> 
+  </table> 
+  
+<h2>Implementation</h2>
+
+<h3>Defining the Application Layout</h3>
+<p>The application has only 1 screen, which displays a header, an input field, and an <strong>Encode</strong> button:</p>
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;header&gt;Morse code flashlight&lt;/header&gt;
+&lt;article&gt;
+&nbsp;&nbsp;&nbsp;&lt;p&gt;Please insert text for encode to Morse code:&lt;/p&gt;
+&nbsp;&nbsp;&nbsp;&lt;input id=&quot;text&quot;/&gt;
+&lt;/article&gt;
+&lt;footer&gt;
+&nbsp;&nbsp;&nbsp;&lt;button id=&quot;start-flashing&quot;&gt;Encode&lt;/button&gt;
+&lt;/footer&gt;
+</pre>
+
+<h3>Flashing Morse Code</h3>
+<p>To flash in Morse code in your application:</p>
+<ol>
+<li>The application can work only if a flashlight is available in the device. 
+<p>When the application starts, the <span style="font-family: Courier New,Courier,monospace">init()</span> method calls the <span style="font-family: Courier New,Courier,monospace">isFlashAvailable()</span> to check the flashlight availability, and initializes the flashlight:</p>
+  
+<pre class="prettyprint">
+/* js/view/main.js */
+function init() 
+{
+&nbsp;&nbsp;&nbsp;if (!flash.isFlashAvailable()) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.alert(&#39;Flash light is not supported. Application will be closed.&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app.exit();
+                               
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;flash.initFlashApi();
+ }
+
+/* js/models/flash.js */
+function isFlashAvailable() 
+{
+&nbsp;&nbsp;&nbsp;return tizen.systeminfo.getCapability(&#39;http://tizen.org/feature/camera.back.flash&#39;) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|| tizen.systeminfo.getCapability(&#39;http://tizen.org/feature/camera.front.flash&#39;);
+}</pre>
+</li>
+
+<li>Initialize the flashlight for use:
+<pre class="prettyprint">
+/* js.models/flash.js */
+function initFlashApi() 
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue(&#39;CAMERA_FLASH&#39;, function successCallback(param)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.fire(&#39;ready&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash = param;
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;function failCallback(error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.fire(&#39;error&#39;, error);
+&nbsp;&nbsp;&nbsp;});
+}</pre>
+</li>
+
+<li>To manage the flashlight:
+<ul><li>To switch the flashlight on, set the brightness value to the maximum of 1.0:
+  <pre class="prettyprint">
+/* js/models/flash.js */
+function flashOn() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.setBrightness(1.0);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.console.error(error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+</li>
+
+<li>To switch the flashlight off, set the brightness to 0.0:
+<pre class="prettyprint">
+/* js/models/flash.js */
+function flashOff() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flash.setBrightness(0.0);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.console.error(error);
+&nbsp;&nbsp;&nbsp;}
+}</pre>
+</li></ul></li>
+
+<li>To send signals in Morse code, you must convert the text from the input field into Morse code and pass it to the method that processes it as flashlight signals:
+<ul><li><p>The <span style="font-family: Courier New,Courier,monospace">translator.encode()</span> method converts the text from the input field into one of 4 signs in Morse code: DOT, DAH, SHORT_GAP or MEDIUM_GAP.</p></li>
+<li><p>The <span style="font-family: Courier New,Courier,monospace">flashCode()</span> method receives the <span style="font-family: Courier New,Courier,monospace">word</span>  parameter, encodes it in Morse code, and changes it into Flashlight signals. The length of each signal is based on the type of signal in the code multiplied by the <span style="font-family: Courier New,Courier,monospace">DIT_LENGTH</span> (base signal display time in milliseconds).</p>
+<p>If the first sign in the converted word is a <span style="font-family: Courier New,Courier,monospace">SHORT_GAP</span> or <span style="font-family: Courier New,Courier,monospace">MEDIUM_GAP</span>, the flashlight is switch off; else the flashlight is switched on. The function recursively passes the letters of the <span style="font-family: Courier New,Courier,monospace">word</span> without the first, already converted letter until there are no letters left to pass.</p></li></ul>
+
+<pre class="prettyprint">
+/* js/views/main.js */
+word = translator.encode(text);
+flash.flashCode(word);
+
+/* js/models/flash.js */
+var DIT_LENGTH = 200;
+function flashCode(word)  
+{
+&nbsp;&nbsp;&nbsp;var signalLen = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separatorLen = 0;
+
+&nbsp;&nbsp;&nbsp;if (!word) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (word[0] === morse.DOT) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signalLen = DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separatorLen = DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else if (word[0] === morse.DAH) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signalLen = 3 * DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separatorLen = DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else if (word[0] ===  morse.SHORT_GAP) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separatorLen = 3 * DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else if (word[0] ===  morse.MEDIUM_GAP) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;separatorLen = 7 * DIT_LENGTH;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;window.setTimeout(function turnOn() 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (word[0] === morse.SHORT_GAP || word[0] === morse.MEDIUM_GAP) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashCode(word.slice(1, word.length));
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashOn();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;window.setTimeout(function turnOff() 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashOff();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;flashCode(word.slice(1, word.length));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, signalLen);
+&nbsp;&nbsp;&nbsp;}, separatorLen);
+}</pre>
+</li>
+</ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div>
+</div>
+</div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/pagenavigation_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/pagenavigation_mw.htm
new file mode 100644 (file)
index 0000000..adc4577
--- /dev/null
@@ -0,0 +1,166 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>PageNavigation Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                  <li><a href="../../../org.tizen.guides/html/web/w3c/device/touch_w.htm">Touch Events version 1 Guide</a></li>
+                  <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#touch">Touch Events version 1 API</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>PageNavigation Sample Overview</h1>
+  <p>The PageNavigation sample application demonstrates how you can handle page navigation with JavaScript.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the PageNavigation.</p>
+  <p class="figure">Figure: PageNavigation screen</p>
+  <p align="center"><img alt="PageNavigation screen" src="../images/pagenavigation_mw.png" /></p>
+
+  <p>The application opens with the main screen. You can navigate between the Main page, second page, and third page by clicking <strong>Prev</strong> and <strong>Next</strong>. To move to the previous page, you can also press the <strong>Back</strong> key of the device.</p>
+
+  <p>The page sequence is: Main page -&gt; Second page -&gt; Third page.</p>
+
+
+  <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p>
+  <table border="1">
+   <tbody>
+    <tr>
+     <th>File name</th>
+     <th>Description</th>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+    </tr>
+       <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+     <td>This file contains the CSS styling for the application UI.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+    </tr>
+       <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+     <td>This file contains the code for handling the main functionality of the application.</td>
+    </tr>
+       <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/page.js</span></td>
+     <td>This file contains the code for handling the page navigation.</td>
+    </tr>
+   </tbody>
+  </table>
+
+
+  <h2>Implementation</h2>
+
+<p>To implement page navigation:</p>  
+
+<ol><li><p>To use the <span style="font-family: Courier New,Courier,monospace">page.js</span> file, add related scripts in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file:</p>
+<pre class="prettyprint">
+&lt;script src=&quot;js/main.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;js/page.js&quot;&gt;&lt;/script&gt;
+</pre>
+</li>
+
+<li><p>When the application starts, make a <span style="font-family: Courier New,Courier,monospace">PageControl</span> object that handles page navigation:</p>
+<pre class="prettyprint">
+pageControl = new PageControl();
+pageSequence = [&quot;pageMain&quot;, &quot;pageSecond&quot;, &quot;pageThird&quot;];
+
+for (i = 0; i &lt; pageSequence.length; i++) 
+{
+&nbsp;&nbsp;&nbsp;pageControl.addPage(pageSequence[i]);
+}
+</pre></li>
+
+<li><p>After the <span style="font-family: Courier New,Courier,monospace">PageControl</span> object is registered, create buttons and register events for each page:</p>
+<pre class="prettyprint">
+for (i = 0; i &lt; pageSequence.length; i++) 
+{
+&nbsp;&nbsp;&nbsp;pageDiv = document.querySelector(&quot;#&quot; + pageSequence[i]).querySelector(&quot;.detail&quot;);
+&nbsp;&nbsp;&nbsp;wrapBtn = document.createElement(&quot;div&quot;);
+&nbsp;&nbsp;&nbsp;btnForward = document.createElement(&quot;div&quot;);
+&nbsp;&nbsp;&nbsp;btnBackward = document.createElement(&quot;div&quot;);
+
+&nbsp;&nbsp;&nbsp;wrapBtn.className = &quot;wrapNaviBtn&quot;;
+&nbsp;&nbsp;&nbsp;btnForward.appendChild(document.createTextNode(&quot;Next &gt;&gt;&quot;));
+&nbsp;&nbsp;&nbsp;btnForward.className = &quot;naviBtn&quot;;
+&nbsp;&nbsp;&nbsp;if (i + 1 &lt; pageSequence.length) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;btnForward.addEventListener(&quot;click&quot;, pageControl.moveNextPage);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;btnBackward.appendChild(document.createTextNode(&quot;&lt;&lt; Prev&quot;));
+&nbsp;&nbsp;&nbsp;btnBackward.className = &quot;naviBtn&quot;;
+&nbsp;&nbsp;&nbsp;if (i &gt; 0) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;btnBackward.addEventListener(&quot;click&quot;, pageControl.movePrevPage);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;wrapBtn.appendChild(btnBackward);
+&nbsp;&nbsp;&nbsp;wrapBtn.appendChild(btnForward);
+&nbsp;&nbsp;&nbsp;pageDiv.appendChild(wrapBtn);
+}
+</pre></li>
+
+<li><p>Add a hardware key event handler to make the <span style="font-family: Courier New,Courier,monospace">PageControl</span> object to return to the previous page when the <strong>Back</strong> key is pressed:</p>
+<pre class="prettyprint">
+if (event.keyName === &quot;back&quot;) 
+{
+&nbsp;&nbsp;&nbsp;if (pageControl.isMainPage() || pageControl.moveBackPage() === false) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.getCurrentApplication().exit();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (ignore) {}
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/screenorientation_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/screenorientation_mw.htm
new file mode 100644 (file)
index 0000000..bfe4c94
--- /dev/null
@@ -0,0 +1,117 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>ScreenOrientation Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../org.tizen.guides/html/web/w3c/device/screen_orientation_w.htm">Screen Orientation Guide</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#sceenori">Screen Orientation API</a></li>                  
+                       <li><a href="../../../org.tizen.gettingstarted/html/web/process/setting_properties_w.htm#tizen">Screen Orientation Configuration</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>ScreenOrientation Sample Overview</h1>
+  <p>The ScreenOrientation sample application demonstrates how you can access the current screen orientation.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the ScreenOrientation.</p>
+  <p class="figure">Figure: ScreenOrientation screen</p>
+  <p align="center"><img alt="ScreenOrientation screen" src="../images/screenorientation_mw.png" /> </p>
+
+
+  <p>The application displays the current screen orientation as the device changes its orientation:</p>
+
+<ul><li>The orientation value can be <strong>portrait-primary</strong>, <strong>landscape-primary</strong>, or <strong>landscape-secondary</strong>.</li>
+<li>The default mode is <strong>portrait-primary</strong>.</li>
+</ul>
+
+  <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p>
+  <table border="1">
+   <tbody>
+    <tr>
+     <th>File name</th>
+     <th>Description</th>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+    </tr>
+    <tr>
+    <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+    <td>This file contains CSS styling for the application UI.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screen.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+     <td>This file contains the code for handling the main application functionalities.</td>
+    </tr>
+   </tbody>
+  </table>
+
+
+<h2>Implementation</h2>
+
+<p>To manage the screen orientation:</p>
+
+<ul><li>
+<p>To access the screen orientation, the <span style="font-family: Courier New,Courier,monospace">screen-orientation</span> property of the <a href="../../../org.tizen.gettingstarted/html/web/process/setting_properties_w.htm#tizen">Tizen setting</a> details in the <span style="font-family: Courier New,Courier,monospace">config.xml</span> file must be set to <span style="font-family: Courier New,Courier,monospace">auto-rotation</span>.</p>
+<p>Set the value in the <strong>Tizen</strong> tab of the Web application configuration editor.</p></li>
+
+<li><p>To retrieve the current screen orientation, use the <span style="font-family: Courier New,Courier,monospace">screen.orientation</span> attribute:</p>
+<pre class="prettyprint">
+var orientationValue = document.getElementById(&#39;orientation&#39;);
+orientationValue.innerHTML = screen.orientation;</pre></li>
+
+<li>
+<p>To receive notifications of the screen orientation changes, add an event listener to the <span style="font-family: Courier New,Courier,monospace">screen</span> object:</p>
+<pre class="prettyprint">
+screen.addEventListener(&quot;orientationchange&quot;, showOrientation, false);</pre></li></ul>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/shapeeditor_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/shapeeditor_mw.htm
new file mode 100644 (file)
index 0000000..bbbeb63
--- /dev/null
@@ -0,0 +1,183 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>ShapeEditor Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../org.tizen.guides/html/web/w3c/graphics/svg_w.htm">HTML5 SVG Guide</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#svg">HTML5 SVG API</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>ShapeEditor Sample Overview</h1>
+  <p>The ShapeEditor sample application demonstrates how you can create and edit various shapes using SVG (Scalable Vector Graphics).</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screens of the ShapeEditor.</p>
+  <p class="figure">Figure: ShapeEditor screens</p>
+  <p align="center"><img alt="ShapeEditor screens" src="../images/shapeeditor_mw.png" /> </p>
+
+
+  <p>The application opens with a blank SVG canvas with the action buttons at the bottom:</p>
+
+<ul><li>Click <strong>Shape</strong> to select a specific shape and the size of the shape.</li>
+<li>Click <strong>Color</strong> to select the color of the shape from a color picker.</li>
+<li>Click <strong>Clear</strong> to remove all the shapes on the SVG canvas.</li></ul>
+
+  <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p>
+  <table border="1">
+   <tbody>
+    <tr>
+     <th>File name</th>
+     <th>Description</th>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+    </tr>
+    <tr>
+    <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+    <td>This file contains CSS styling for the application UI.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screen.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+     <td>This file contains the code for handling the main application functionalities.</td>
+    </tr>
+   </tbody>
+  </table>
+
+
+<h2>Implementation</h2>
+
+<p>To implement SVG features:</p>
+
+<ol><li>
+<p>Use graphic elements to create various shapes, and define attributes, such as location, size, and color of the shapes: </p>
+<pre class="prettyprint">
+&lt;svg class=&quot;shape-svg&quot; viewBox=&quot;0 0 200 200&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;rect class=&quot;shape-element&quot; id=&quot;select-rect&quot; width=&quot;200&quot; height=&quot;200&quot; /&gt;
+&lt;/svg&gt;
+&lt;svg class=&quot;shape-svg&quot; viewBox=&quot;0 0 200 200&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;ellipse class=&quot;shape-element&quot; id=&quot;select-ellipse&quot; cx=&quot;100&quot; cy=&quot;100&quot; rx=&quot;100&quot; ry=&quot;100&quot; /&gt;
+&lt;/svg&gt;
+&lt;svg class=&quot;shape-svg&quot; viewBox=&quot;0 0 200 200&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;polygon class=&quot;shape-element&quot; id=&quot;select-triangle&quot; points=&quot;100,0 0,200 200,200&quot; /&gt;
+&lt;/svg&gt;</pre></li>
+
+<li>Handle touch events:
+<ul><li>
+<p>The <span style="font-family: Courier New,Courier,monospace">touchStartHandler()</span> method is called when the <span style="font-family: Courier New,Courier,monospace">touchstart</span> event is triggered. It uses the <span style="font-family: Courier New,Courier,monospace">changedTouches</span> array event property to access the data of the current <span style="font-family: Courier New,Courier,monospace">touch</span> object. The current touch data is saved to the <span style="font-family: Courier New,Courier,monospace">drawPath</span> object, which is an associative array indexed with the <span style="font-family: Courier New,Courier,monospace">identifier</span> parameter of the current <span style="font-family: Courier New,Courier,monospace">touch</span> object.</p>
+<pre class="prettyprint">
+function bindEvents() 
+{
+&nbsp;&nbsp;&nbsp;svgBoard.addEventListener(&#39;touchstart&#39;, touchStartHandler, false);
+}
+
+function touchStartHandler(e) 
+{
+&nbsp;&nbsp;&nbsp;var touch = e.changedTouches[0];
+
+&nbsp;&nbsp;&nbsp;drawPath[touch.identifier] = touch;
+&nbsp;&nbsp;&nbsp;timer = setTimeout(longtouchHandler, touchDuration);
+}</pre></li>
+<li>
+<p>The <span style="font-family: Courier New,Courier,monospace">touchEndHandler()</span> method is called when the <span style="font-family: Courier New,Courier,monospace">touchend</span> event is triggered, and it adds a new shape into the SVG board.
+The <span style="font-family: Courier New,Courier,monospace">pageX</span> and <span style="font-family: Courier New,Courier,monospace">pageY</span> properties of the <span style="font-family: Courier New,Courier,monospace">touch</span> object represent the coordinates of the touch point. After a new shape is inserted, the method resets the <span style="font-family: Courier New,Courier,monospace">drawPath</span> object to remove the information about the touch that no longer exists.</p>
+<pre class="prettyprint">
+function bindEvents() 
+{
+&nbsp;&nbsp;&nbsp;svgBoard.addEventListener(&#x27;touchend&#x27;, touchEndHandler, false);
+}
+
+function touchEndHandler(e) 
+{
+&nbsp;&nbsp;&nbsp;var touch = e.changedTouches[0],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = 0;
+
+&nbsp;&nbsp;&nbsp;/* Add a new shape into the SVG board */
+&nbsp;&nbsp;&nbsp;if (!isLongTouch) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x = touch.pageX - content.offsetLeft - (0.25 * shapeSize * 100);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = touch.pageY - content.offsetTop - (0.25 * shapeSize * 100);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;innerHtmlSvg(&#x22;svg-board&#x22;, &#x22;shape&#x22; + shapeIndex, svgShapeTag, shapeSize, x, y);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;delete drawPath[touch.identifier];
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;/* Stop short touches from firing the event */
+&nbsp;&nbsp;&nbsp;isLongTouch = 0;
+&nbsp;&nbsp;&nbsp;if (timer) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clearTimeout(timer);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ul></li>
+
+<li>
+<p>Since SVG is essentially graphics defined in XML format, the <span style="font-family: Courier New,Courier,monospace">innerHtml</span> property is not supported in the <span style="font-family: Courier New,Courier,monospace">svg</span> elements.</p>
+<p>A workaround method is used for adding new <span style="font-family: Courier New,Courier,monospace">svg</span> elements into the SVG board:</p>
+<pre class="prettyprint">
+function innerHtmlSvg(boardId, shapeId, shapeTag, shapeRatio, traslateX, traslateY) 
+{
+&nbsp;&nbsp;&nbsp;var tempDiv = document.createElement(&#39;div&#39;), /* Create a dummy tempDiv */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Wrap the svg string to a svg object */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;svgFragment = &#39;&lt;svg&gt;&#39; + shapeTag + &#39;&lt;/svg&gt;&#39;; 
+
+&nbsp;&nbsp;&nbsp;tempDiv.innerHTML = svgFragment; /* Add all svg to the tempDiv */
+&nbsp;&nbsp;&nbsp;Array.prototype.slice.call(tempDiv.childNodes[0].childNodes).forEach(function(el) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.querySelector(&#39;#&#39; + boardId).appendChild(el);
+&nbsp;&nbsp;&nbsp;}); /* Copy the children of the tempDiv&#39;s SVG to the actual body&#39;s SVG */
+}
+</pre></li></ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/spiritlevel_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/spiritlevel_mw.htm
new file mode 100644 (file)
index 0000000..5b6e721
--- /dev/null
@@ -0,0 +1,152 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>SpiritLevel Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../org.tizen.guides/html/web/w3c/device/device_orientation_w.htm">DeviceOrientation Event Specification Guide</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/w3c_api/w3c_api_m.html#orientation">DeviceOrientation Event Specification API</a></li>
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html">Application API</a></li>
+               </ul>
+       </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>SpiritLevel Sample Overview</h1>
+  <p>The SpiritLevel sample application demonstrates how you can use the W3C <span style="font-family: Courier New,Courier,monospace">devicemotion</span> event in your application to monitor the inclination of the device. </p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screen of the SpiritLevel.</p>
+  <p class="figure">Figure: SpiritLevel screen</p>
+  <p align="center"><img alt="SpiritLevel screen" src="../images/spiritlevel_mw.png" /> </p>
+  <p>The application opens with the main screen that represents the inclination of the device.</p>
+
+  <h2>Source Files</h2>
+  <p>You can create and view the sample application project including the source files in the IDE.</p>
+  <table border="1">
+   <tbody>
+    <tr>
+     <th>File name</th>
+     <th>Description</th>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+    </tr>
+    <tr>
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+     <td>This file contains the code for handling the device orientation functionality of the application.</td>
+    </tr>
+   </tbody>
+  </table>
+
+<h2>Implementation</h2>
+
+<p>To manage the motion events:</p>
+
+<ol><li>
+<p>Add the <span style="font-family: Courier New,Courier,monospace">DeviceMotionEvent</span> event listener:</p>
+<pre class="prettyprint">
+if (window.DeviceMotionEvent) 
+{
+&nbsp;&nbsp;&nbsp;window.addEventListener(&quot;devicemotion&quot;, onOrientationChange);
+} 
+else 
+{
+&nbsp;&nbsp;&nbsp;return false;
+}
+</pre></li>
+<li>
+<p>In the event callback, move the ball position by calculating the device inclination:</p>
+<pre class="prettyprint">
+noGravitation = dataEvent.acceleration;
+dataEvent = dataEvent.accelerationIncludingGravity;
+
+xDiff = dataEvent.x - noGravitation.x;
+if (Math.abs(xDiff) &gt; MAX_G) 
+{
+&nbsp;&nbsp;&nbsp;xDiff = xDiff / Math.abs(xDiff) * MAX_G;
+}
+yDiff = -1 * (dataEvent.y - noGravitation.y);
+if (Math.abs(yDiff) &gt; MAX_G) 
+{
+&nbsp;&nbsp;&nbsp;yDiff = yDiff / Math.abs(yDiff) * MAX_G;
+}
+
+xPos = (outerRadius - ballRadius) * xDiff / MAX_G;
+yPos = (outerRadius - ballRadius) * yDiff / MAX_G;
+
+ball.style.left = centerX - ballRadius + xPos + &quot;px&quot;;
+ball.style.top = centerY - ballRadius + yPos + &quot;px&quot;;
+</pre></li>
+
+<li>
+<p>Make the ball glow when it is in the inner circle (the device keeps in equilibration):</p>
+<pre class="prettyprint">
+if (inCircleRange(xPos, yPos, innerRadius - ballRadius)) 
+{
+&nbsp;&nbsp;&nbsp;if (statusGlow === false) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setGlow(true);
+&nbsp;&nbsp;&nbsp;}
+} 
+else 
+{
+&nbsp;&nbsp;&nbsp;if (statusGlow === true) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setGlow(false);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function inCircleRange(x, y, r) 
+{
+&nbsp;&nbsp;&nbsp;return (x * x + y * y &lt;= r * r) ? true : false;
+}
+</pre></li></ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/mobile_w/systemsettings_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/systemsettings_mw.htm
new file mode 100644 (file)
index 0000000..c4f848a
--- /dev/null
@@ -0,0 +1,519 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>SystemSettings Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       
+       <div id="toc_border"><div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                       <li><a href="../../../org.tizen.guides/html/web/tizen/system/system_setting_w.htm">System Settings Guide</a></li> 
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systemsetting.html">System Setting API</a></li> 
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/application.html">Application API</a></li> 
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/power.html">Power API</a></li> 
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html">System Information API</a></li> 
+                       <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/websetting.html">Web Setting API</a></li> 
+               </ul>
+       </div></div>
+</div> 
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>SystemSettings Sample Overview</h1> 
+  <p>The SystemSettings sample application demonstrates you can obtain and set various system settings on a mobile device.</p> 
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Web Sample Applications</a>.</p>
+  <p>The following figure illustrates some of the screens of the SystemSettings.</p> 
+  <p class="figure">Figure: SystemSettings screens</p> 
+  <p align="center"><img alt="SystemSettings screens" src="../images/systemsetting_mw_sd.png" /> </p> 
+  <p>The application opens with the main screen that displays a list of available system settings grouped into categories. Select a category to view and modify the related settings:</p> 
+  
+<ul><li>In the <strong>Backgrounds</strong> category, you can set the home screen and lock screen wallpapers.</li>
+<li>In the <strong>Sounds</strong> category, you can set the call ringtone and email notification.</li>
+<li>In the <strong>Screen</strong> category, you can set the brightness and screen power state.</li>
+<li>In the <strong>Web settings</strong> category, you can set the cookies and user agent property.</li></ul>
+
+  
+
+  <h2>Source Files</h2> 
+  <p>You can create and view the sample application project including the source files in the IDE.</p> 
+  <table border="1"> 
+   <tbody> 
+    <tr> 
+     <th>File name</th> 
+     <th>Description</th> 
+    </tr> 
+ <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">app.js</span></td> 
+     <td>This is a starting file from which the JavaScript code starts loading.</td> 
+    </tr>      
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td> 
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td> 
+    </tr>
+       <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td> 
+     <td>This file contains the CSS styling for the application UI.</td> 
+    </tr>
+    <tr> 
+       <td><span style="font-family: Courier New,Courier,monospace">images/</span></td> 
+     <td>This directory contains the images used to create the user interface.</td> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td> 
+     <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td> 
+    </tr>
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/</span></td> 
+     <td>This directory contains the application code.</td> 
+    </tr> 
+    <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/core/</span></td> 
+     <td>This directory contains application framework.</td> 
+    </tr> 
+    <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/models/applicationControl.js</span></td> 
+     <td>This file contains functions for working with the Application Control API.</td> 
+    </tr>   
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/models/power.js</span></td> 
+     <td>This file contains functions for working with the Power API.</td> 
+    </tr>
+<tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/models/systemInfo.js</span></td> 
+     <td>This file contains functions for working with the System Information API.</td> 
+    </tr>   
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/models/systemSettings.js</span></td> 
+     <td>This file contains functions for working with the System Setting API.</td> 
+    </tr>
+<tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/models/webSettings.js</span></td> 
+     <td>This file contains functions for working with the Web Setting API.</td> 
+    </tr>   
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/views/background.js</span></td> 
+     <td>This file contains the code that handles the interaction with the background settings screen.</td> 
+    </tr>
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/views/main.js</span></td> 
+     <td>This file contains the code that handles the interaction with main screen.</td> 
+    </tr>
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/views/screen.js</span></td> 
+     <td>This file contains the code that handles the interaction with screen settings screen.</td> 
+    </tr>
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/views/sound.js</span></td> 
+     <td>This file contains the code that handles the interaction with sound settings screen.</td> 
+    </tr>      
+       <tr> 
+    <td><span style="font-family: Courier New,Courier,monospace">js/views/web.js</span></td> 
+     <td>This file contains the code that handles the interaction with Web settings screen.</td> 
+    </tr>      
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">lib/</span></td> 
+     <td>This directory contains the external libraries (TAU library).</td> 
+    </tr> 
+   </tbody> 
+  </table> 
+
+<h2>Implementation</h2> 
+
+<h3>Defining the Application Layout</h3>
+<p>The application contains various screens, which all have a header and a list:</p>
+<ul><li>Main screen consists of a list of links that lead the user to the other screens. The links are divided into categories that group similar functionality, and the categories are implemented with list dividers (<span style="font-family: Courier New,Courier,monospace">&lt;li&gt;</span> elements with the <span style="font-family: Courier New,Courier,monospace">data-role=&quot;list-divider&quot;</span> attribute).
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;li data-role=&quot;list-divider&quot;&gt;
+&nbsp;&nbsp;&nbsp;Personalization
+&lt;/li&gt;
+</pre>
+
+<p>Each link contains an image that is placed in the list element. A list element with a link has the <span style="font-family: Courier New,Courier,monospace">ui-li-anchor</span> class, the link with an image has the <span style="font-family: Courier New,Courier,monospace">li-has-image</span> class, and the image has the <span style="font-family: Courier New,Courier,monospace">li-image</span> class:</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;li id=&quot;main-backgrounds&quot; class=&quot;ui-li-anchor&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#backgrounds&quot; class=&quot;li-has-image&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;img class=&quot;li-image&quot; src=&quot;./images/lock_screen.png&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Backgrounds
+&nbsp;&nbsp;&nbsp;&lt;/a&gt;
+&lt;/li&gt;
+</pre></li>
+
+<li>Screen settings screen consists of a list of editable settings (the other screens except for the main screen are similar to the screen settings screen). The settings are placed in list elements, and since they are not links, they are implemented with the <span style="font-family: Courier New,Courier,monospace">ui-li-static</span> class. List elements with multiple lines have the <span style="font-family: Courier New,Courier,monospace">li-has-multiline</span> class.
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;li class=&quot;ui-li-static li-has-multiline&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;input id=&quot;screen-brightness-slider&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;100&quot; value=&quot;50&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;span id=&quot;screen-brightness-label&quot; class=&quot;li-text-sub li-text-sub-center&quot;&gt;&lt;/span&gt;
+&lt;/li&gt;
+</pre>
+
+<p>Link elements with buttons have the <span style="font-family: Courier New,Courier,monospace">li-has-right-circle-button</span> class:</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;li class=&quot;ui-li-static li-has-right-circle-btn&quot;&gt;
+&nbsp;&nbsp;&nbsp;Turn off the screen for 3 seconds
+&nbsp;&nbsp;&nbsp;&lt;button id=&quot;screen-off-btn&quot; data-inline=&quot;true&quot; data-icon=&quot;power&quot; data-style=&quot;circle&quot;&gt;&lt;/button&gt;
+&lt;/li&gt;
+</pre></li>
+</ul>
+
+<h3>Checking Capabilities</h3>
+<p>At the application start, check some capabilities to determine which application features are supported in the device.</p>
+<p>To check the capability, use the <span style="font-family: Courier New,Courier,monospace">getCapability()</span> method to retrieve information about device and its supported features. The method returns a Boolean value indicating the feature availability.</p>
+
+<pre class="prettyprint">
+/* systemInfo.js */
+var capabilityPrefix = &#39;http://tizen.org/feature/&#39;;
+
+function getCapability(capabilityId) 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (window.tizen) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return window.tizen.systeminfo
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;.getCapability(capabilityPrefix + capabilityId);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<h3>Controlling the Background and Sound Settings</h3>
+
+<p>To set some system settings, such as the home and lock screen wallpaper, incoming call ringtone, and email notification sound, you can use application controls to launch or communicate with other applications (in this case, to view the available images or sound files in the system in order to select one).</p>
+
+<p>To modify settings using application controls:</p>
+
+<ol>
+<li>Find the application control.
+<p>To find an application control that provides the operation you need (in this case, to pick a file), you must create an ApplicationControl with the applicable operation and extra information (in this case, a MIME type), and search for it with the <span style="font-family: Courier New,Courier,monospace">findAppControl()</span> method:</p>
+
+<pre class="prettyprint">
+/* applicationControl.js */
+IMAGE: 
+{
+&nbsp;&nbsp;&nbsp;operation: &#39;http://tizen.org/appcontrol/operation/pick&#39;,
+&nbsp;&nbsp;&nbsp;mime: &#39;image/*&#39;
+}
+
+function launchApplicationControl(applicationControlData) 
+{
+&nbsp;&nbsp;&nbsp;var service = null;
+
+&nbsp;&nbsp;&nbsp;return new Promise(function onPromise(resolve, reject) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;service = new tizen.ApplicationControl(applicationControlData.operation, null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;applicationControlData.mime, null);
+                       
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.findAppControl(service, resolve, reject);                      
+</pre> 
+</li>
+
+<li>Launching the application control.
+<p>The <span style="font-family: Courier New,Courier,monospace">findAppControl()</span> method returns a list of applications capable of handling the provided operation with the provided mime type. After finding and selecting a proper application control, you can launch it:</p>
+
+<pre class="prettyprint">
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.launchAppControl(service, null, null, reject,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onsuccess: function onReplySuccess(data) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resolve(getPickResult(data));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onfailure: function onReplyFail(error) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reject(error);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reject(error);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;});
+}
+</pre></li>
+
+<li>Retrieve the application control result.
+<p>After the application control launch, you can retrieve some data, if the launched application provides it. You can do it by finding a specific key in the success reply callback of the <span style="font-family: Courier New,Courier,monospace">launchAppControl()</span> method:</p>
+
+<pre class="prettyprint">
+/* applicationControl.js */
+APP_CONTROL_SELECTED_KEY = &#39;http://tizen.org/appcontrol/data/selected&#39;;
+
+function getPickResult(data) 
+{
+&nbsp;&nbsp;&nbsp;var length = data.length,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = 0;
+
+&nbsp;&nbsp;&nbsp;for (; i &lt; length; i += 1) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (data[i].key === APP_CONTROL_SELECTED_KEY) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return data[i].value;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;return [];
+}
+</pre></li>
+
+<li>After retrieving the application control result (the selected file), you can set it as the new system setting value using the <span style="font-family: Courier New,Courier,monospace">setProperty()</span> method:
+
+<pre class="prettyprint">
+/* systemSettings.js */´
+var TYPE = Object.freeze(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;HOME_SCREEN: &#39;HOME_SCREEN&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;LOCK_SCREEN: &#39;LOCK_SCREEN&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INCOMING_CALL: &#39;INCOMING_CALL&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NOTIFICATION_EMAIL: &#39;NOTIFICATION_EMAIL&#39;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+       
+function setProperty(type, value) 
+{
+&nbsp;&nbsp;&nbsp;return new Promise(function onPromise(resolve, reject) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systemsetting.setProperty(type, value, resolve, reject);
+&nbsp;&nbsp;&nbsp;});
+}
+</pre></li></ol>
+
+<p>To retrieve the current system setting value, use the <span style="font-family: Courier New,Courier,monospace">getProperty()</span> method:</p>
+
+<pre class="prettyprint">
+/* systemSettings.js */
+function getProperty(type) 
+{
+&nbsp;&nbsp;&nbsp;return new Promise(function onPromise(resolve, reject) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.systemsetting.getProperty(type, resolve, reject);
+&nbsp;&nbsp;&nbsp;});
+}
+</pre>
+
+<h3>Controlling the Screen Brightness</h3>
+
+<p>You can modify the screen brightness settings in the 0.0 – 1.0 range. In this example, the value is converted to integers between 0 and 100.</p>
+
+<p>You can retrieve the current screen brightness value, set a new value, or restore the brightness to a previous value using the <span style="font-family: Courier New,Courier,monospace">getScreenBrightness()</span>, <span style="font-family: Courier New,Courier,monospace">setScreenBrightness()</span>, and <span style="font-family: Courier New,Courier,monospace">restoreScreenBrightness()</span> methods:</p>
+
+<pre class="prettyprint">
+/* power.js */
+BRIGHTNESS_FACTOR = 100;
+
+function getScreenBrightness() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return Math.round(tizen.power.getScreenBrightness() * BRIGHTNESS_FACTOR);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function setScreenBrightness(value) 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.setScreenBrightness(value / BRIGHTNESS_FACTOR);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function restoreScreenBrightness() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.restoreScreenBrightness();
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<h3>Controlling the Screen Power State</h3>
+
+<p>You can control the screen backlight behavior and switch the screen on and off:</p>
+
+<ul>
+<li>To control the backlight:
+
+<p>The screen has 3 possible states:</p>
+<ul><li><span style="font-family: Courier New,Courier,monospace">SCREEN_OFF</span> indicates that the screen backlight states are not restricted.</li> 
+<li><span style="font-family: Courier New,Courier,monospace">SCREEN_DIM</span> indicates that screen backlight can switch to a dim state, but cannot switch off (screen is always on, but can dim).</li>
+<li><span style="font-family: Courier New,Courier,monospace">SCREEN_NORMAL</span> indicates that screen backlight is always at the current level and cannot be dimmed or switched off (screen is always on).</li></ul>
+
+<p>You can control the backlight state by requesting and releasing it:</p>
+
+<pre class="prettyprint">
+/* power.js */
+var SCREEN_STATE = Object.freeze(
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;OFF: &#39;SCREEN_OFF&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DIM: &#39;SCREEN_DIM&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NORMAL: &#39;SCREEN_NORMAL&#39;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}),
+&nbsp;&nbsp;&nbsp;&nbsp;SCREEN_RESOURCE = &#39;SCREEN&#39;;
+
+function requestPowerState(screenState) 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.request(SCREEN_RESOURCE, screenState);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function releasePowerState() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.release(SCREEN_RESOURCE);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+
+<li>To switch the screen on and off, use the <span style="font-family: Courier New,Courier,monospace">turnScreenON()</span> and <span style="font-family: Courier New,Courier,monospace">turnScreenOff()</span> methods:
+
+<pre class="prettyprint">
+/* power.js */
+function turnScreenOn() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.turnScreenOn();
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function turnScreenOff() 
+{
+&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.power.turnScreenOff();
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(error);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ul>
+
+
+<h3>Controlling Web Settings</h3>
+
+<p>You can clear cookies and set a user agent string for the current application:</p>
+
+<ul><li>
+Remove the cookies with the <span style="font-family: Courier New,Courier,monospace">removeAllCookies()</span> method:
+
+<pre class="prettyprint">
+/* webSettings.js */
+function removeAllCookies() 
+{
+&nbsp;&nbsp;&nbsp;return new Promise(function onPromise(resolve, reject) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.websetting.removeAllCookies(resolve, reject);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reject(error);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;});
+}
+</pre></li>
+
+<li>Set a user agent with the <span style="font-family: Courier New,Courier,monospace">setUserAgentString()</span> method:
+<pre class="prettyprint">
+/* webSettings.js */
+function setUserAgentString(userAgent) 
+{
+&nbsp;&nbsp;&nbsp;return new Promise(function onPromise(resolve, reject) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.websetting.setUserAgentString(userAgent, resolve, reject);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;reject(error);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;});
+}
+</pre></li></ul>
+
+  
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/mobile_w/wifi_info_mw.htm b/org.tizen.sampledescriptions/html/mobile_w/wifi_info_mw.htm
new file mode 100644 (file)
index 0000000..658ad71
--- /dev/null
@@ -0,0 +1,259 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+       <script type="text/javascript" src="../scripts/snippet.js"></script>    
+       <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+
+       <title>WiFi Info Sample Overview</title>  
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+       <div id="profile">
+               <p><img alt="Mobile Web" src="../images/mobile_s_w.png"/></p>
+       </div>
+       
+       <div id="toc_border">
+       <div id="toc">
+               <p class="toc-title">Related Info</p>
+               <ul class="toc">
+                  <li><a href="../../../org.tizen.guides/html/web/tizen/system/system_info_w.htm">System Information Guide</a></li> 
+                  <li><a href="../../../org.tizen.web.apireference/html/device_api/mobile/tizen/systeminfo.html">System Information API</a></li>   
+               </ul>
+       </div>
+       </div>
+</div> 
+
+<div id="container"><div id="contents"><div class="content">
+  <h1>WiFi Info Sample Overview</h1> 
+  <p>The WiFi Info sample application demonstrates how you can display Wi-Fi connection information.</p>
+  <p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+  <p>The following figure illustrates the main screens of the WiFi Info.</p>
+  <p class="figure">Figure: WiFi Info screens</p>
+  <p align="center"><img src="../images/wifi_info.png" alt="WiFi Info screens"/></p>
+
+<p>The application opens with the main screen, which displays the details of the currently connected Wi-Fi network. If no network is connected, only the <strong>Not Connected</strong> connection status is displayed.</p>  
+<p>If a Wi-Fi connection is active, the following information is displayed:</p>
+<ul>
+<li>SSID</li>
+<li>Signal strength (low/medium/good)</li>
+<li>IP address</li>
+<li>IPv6 address</li>
+<li>MAC address</li></ul>
+  
+<h2>Source Files</h2> 
+<p>You can create and view the sample application project including the source files in the IDE.</p>   
+  <table> 
+   <tbody> 
+    <tr> 
+     <th>File name</th> 
+     <th>Description</th> 
+    </tr> 
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td> 
+     <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td> 
+    </tr> 
+        <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">ccs/style.css</span></td> 
+     <td>This file contains CSS styling for the application UI.</td> 
+    </tr> 
+
+    <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td> 
+     <td>This is a starting file from which the application starts loading. It also contains the layout of the application screens.</td> 
+    </tr>
+       <tr> 
+     <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td> 
+     <td>This file contains the application code.</td> 
+    </tr>      
+   </tbody> 
+  </table> 
+  
+<h2>Implementation</h2>
+
+<h3>Defining the Application Layout</h3>
+<p>The application has only 1 screen, which consists of 2 parts:</p>
+<ul>
+<li><span style="font-family: Courier New,Courier,monospace">reach</span> container displays the current level of the Wi-Fi signal quality.</li>
+<li><span style="font-family: Courier New,Courier,monospace">wifi-info</span> list displays all available information about the Wi-Fi connection.</li>
+</ul>
+
+<pre class="prettyprint">
+&lt;html&gt;
+&nbsp;&nbsp;&nbsp;&lt;body&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;WiFi Info
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;wifi-info-box&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;reach&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;good-strength-icon&quot; class=&quot;wave&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;medium-strength-icon&quot; class=&quot;wave&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;low-strength-icon&quot; class=&quot;wave&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;status-icon&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul id=&quot;wifi-info&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;Status&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;status&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;SSID&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;ssid&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;Signal Strength&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;signalStrength&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;IP&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;ip&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;IPv6&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;ipv6&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li class=&quot;propname&quot;&gt;MAC Address&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li id=&quot;mac&quot; class=&quot;propvalue&quot;&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<h3>Initializing the Application</h3>
+<p>To initialize the application:</p>
+<ol>
+<li>Check the Wi-Fi support.
+<p>The application checks the device capacity for Wi-Fi networking on startup. If Wi-Fi is supported, the application requests the Wi-Fi information. Otherwise, the application is closed.</p>
+
+<pre class="prettyprint">
+if (checkCapacity()) 
+{
+&nbsp;&nbsp;&nbsp;/* Get current information about Wi-Fi */
+&nbsp;&nbsp;&nbsp;getWifiInfo();
+&nbsp;&nbsp;&nbsp;/* Register listener for changes */
+&nbsp;&nbsp;&nbsp;registerWiFiListener();
+} 
+else
+{
+&nbsp;&nbsp;&nbsp;window.alert(&#39;This device doesn\&#39;t support Wi-Fi networks&#39;);
+&nbsp;&nbsp;&nbsp;tizen.application.getCurrentApplication().exit();
+}
+
+function checkCapacity() 
+{
+&nbsp;&nbsp;&nbsp;return tizen.systeminfo.getCapability(WIFI_FEATURE);
+}
+</pre>
+</li>
+<li>Get information about the connection.
+<p>The <span style="font-family: Courier New,Courier,monospace">getWifiInfo()</span> method retrieves information about the currently connected Wi-Fi network and passes that information to the <span style="font-family: Courier New,Courier,monospace">updateUI()</span> method for displaying on the screen.</p>
+<pre class="prettyprint">
+function getWifiInfo()
+{
+&nbsp;&nbsp;&nbsp;tizen.systeminfo.getPropertyValue(SYSINFO_WIFI_KEY, updateUI);
+}
+</pre>
+</li>
+<li>Register listeners:
+<ul><li>
+<p>Register a listener to receive information when the user changes the Wi-Fi connection. The new connection information is passed to the <span style="font-family: Courier New,Courier,monospace">updateUI()</span> method for refreshing the screen.
+</p>
+<pre class="prettyprint">
+function registerWiFiListener() 
+{
+&nbsp;&nbsp;&nbsp;listenerId = tizen.systeminfo.addPropertyValueChangeListener(SYSINFO_WIFI_KEY, updateUI);
+}
+</pre>
+<p>Register the listener for back key press events. When the key is pressed, the application removes the Wi-Fi info listener and exits.</p>
+<pre class="prettyprint">
+/* Add eventListener for tizenhwkey */
+document.addEventListener(&#39;tizenhwkey&#39;, function onHwKeyEvent(e)  
+{
+&nbsp;&nbsp;&nbsp;if (e.keyName === &#39;back&#39;) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;removeWiFiListener();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.getCurrentApplication().exit();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (error) 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;getCurrentApplication(): &#39; + error.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+});</pre>
+</li></ul></li>
+</ol>
+
+<h3>Updating the UI</h3>
+<p>The <span style="font-family: Courier New,Courier,monospace">updateUI()</span> method updates the Wi-Fi information on the screen.</p>
+<p>The method also updated the signal strength icon to show the appropriate number of levels.</p>
+
+<pre class="prettyprint">
+function updateUI(data) 
+{
+&nbsp;&nbsp;&nbsp;var statusIcon = document.getElementById(&#39;status-icon&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lowStrengthIcon = document.getElementById(&#39;low-strength-icon&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;medStrengthIcon = document.getElementById(&#39;medium-strength-icon&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;goodStrengthIcon = document.getElementById(&#39;good-strength-icon&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;signalQuality;
+
+&nbsp;&nbsp;&nbsp;/* Update WiFi info list */
+&nbsp;&nbsp;&nbsp;document.getElementById(&#39;status&#39;).innerText = data.status === &#39;ON&#39; ? &#39;Connected&#39; : &#39;Not Connected&#39;;
+
+&nbsp;&nbsp;&nbsp;if (data.status === &#39;ON&#39;) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Show extended info */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;wifi-info&#39;).className = &#39;&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;ssid&#39;).innerText = data.ssid;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;signalStrength&#39;).innerText = (data.signalStrength * 100).toString() + &#39;%&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;ip&#39;).innerText = data.ipAddress || &#39;N/A&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;ipv6&#39;).innerText = data.ipv6Address || &#39;N/A&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;mac&#39;).innerText = data.macAddress;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Hide all extended info. It is not needed because */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* there is no connection to any Wi-Fi network */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;wifi-info&#39;).className = &#39;off&#39;;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;/* Refresh Wi-Fi status icon */
+&nbsp;&nbsp;&nbsp;statusIcon.className = (data.status === &#39;ON&#39;) ? &#39;active&#39; : &#39;&#39;;
+
+&nbsp;&nbsp;&nbsp;/* Get signal quality */
+&nbsp;&nbsp;&nbsp;signalQuality = getSignalQuality(data.signalStrength);
+&nbsp;&nbsp;&nbsp;console.log(&#39;Signal quality&#39;, signalQuality);
+
+&nbsp;&nbsp;&nbsp;/* Show signal quality  on UI */
+&nbsp;&nbsp;&nbsp;lowStrengthIcon.className = signalQuality &gt; 0 ? ACTIVE_WAVE_CSS_CLASS : WAVE_CSS_CLASS;
+&nbsp;&nbsp;&nbsp;medStrengthIcon.className = signalQuality &gt; 1 ? ACTIVE_WAVE_CSS_CLASS : WAVE_CSS_CLASS;
+&nbsp;&nbsp;&nbsp;goodStrengthIcon.className = signalQuality &gt; 2 ? ACTIVE_WAVE_CSS_CLASS : WAVE_CSS_CLASS;
+}</pre>
+
+
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+</div>
+</div>
+</div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
diff --git a/org.tizen.sampledescriptions/html/wearable_w/appmanager_ww.htm b/org.tizen.sampledescriptions/html/wearable_w/appmanager_ww.htm
new file mode 100644 (file)
index 0000000..de7a455
--- /dev/null
@@ -0,0 +1,376 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+    <script type="text/javascript" src="../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+    <title>App Manager Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Wearable Web" src="../images/wearable_s_w.png"/></p>
+    </div>
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../org.tizen.guides/html/web/tizen/application/application_w.htm">Application Guide</a></li>
+            <li><a href="../../../org.tizen.web.apireference/html/device_api/wearable/tizen/application.html">Application API</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>App Manager Sample Overview</h1>
+
+<p>The App Manager sample application demonstrates how you can manage applications installed on a device.</p>
+<p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+<p>The following figure illustrates the main screens of the App Manager.</p>
+<p class="figure">Figure: App Manager screens</p>
+<p align="center"><img alt="App Manager screens" src="../images/appmanager_screen_1_ww.png" /> <img alt="App Manager screens" src="../images/appmanager_screen_2_ww.png" /></p>
+<p align="center"><img alt="App Manager screens" src="../images/appmanager_screen_3_ww.png" /> <img alt="App Manager screens" src="../images/appmanager_screen_4_ww.png" /></p>
+<p>The application opens with the main screen (top row in the figure) that shows a list of installed applications. With the menu button at the top, you can filter the list by applications status to show all applications or only applications launched at the moment.</p>
+<p>To see the application details in the details page (bottom row in the figure), click an application in the list. The details page displays the application icon, version, installation date, and size. To launch the application, open the menu from the button at the top, and select <strong>Launch</strong>.</p>
+
+  <h2>Prerequisites</h2> 
+  <p>To ensure proper application execution, the following privileges must be set:</p>
+  <ul><li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/application.info</span></li>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/application.launch</span></li></ul>
+
+<h2>Source Files</h2>
+
+<p>You can create and view the sample application project including the source files in the IDE.</p>
+
+<p>The application uses a simple MV (Model View) architecture, where the core part determines the architecture and the app part determines the application behavior. The <span style="font-family: Courier New,Courier,monospace">core.js</span> file implements a simple AMD (Asynchronous Module Definition) and specifies module defining.</p>
+
+<table border="1">
+    <tbody>
+        <tr>
+            <th>File name</th>
+            <th>Description</th>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+            <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">css/</span></td>
+            <td>This directory contains the CSS styling for the application UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+            <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/</span></td>
+            <td>This directory contains the application code.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/core/</span></td>
+            <td>This directory contains the application framework.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/models/</span></td>
+            <td>This directory contains the application model modules.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/</span></td>
+            <td>This directory contains the files that implement the application views.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">templates/</span></td>
+            <td>This directory contains the templates for the list items.</td>
+        </tr>
+    </tbody>
+</table>
+
+
+<h2>Implementation</h2>
+
+<h3>Application Layout</h3>
+
+<p>To define the application layout:</p>
+
+<ol><li>
+<p>The main page layout consists of a header with a menu button, a list of applications, and a menu popup (displayed after a click on the menu button in the header):</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;main&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header ui-has-more&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;App Manager&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;ui-more ui-icon-overflow menu-drawer-handler&quot;&gt;&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content content-padding&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot; id=&quot;apps-list-view&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;!--Square profile menu--&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;main-menu-popup&quot; class=&quot;ui-popup&quot; data-transition=&quot;slideup&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Options&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;option-button all-apps&quot;&gt;All apps&lt;/a&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;a href=&quot;#&quot; class=&quot;option-button launched-apps&quot;&gt;Only launched&lt;/a&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;!--Circle profile menu--&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-drawer menu-drawer&quot; data-drawer-target=&quot;#main&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-position=&quot;right&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view-switcher&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button all-apps&quot;&gt;All&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button launched-apps&quot;&gt;Launched&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
+</pre>
+
+<p>The application list rows are generated from the <span style="font-family: Courier New,Courier,monospace">templates/app-row.tpl</span> template file:</p>
+
+<pre class="prettyprint">
+&lt;!--templates/app-row.tpl--&gt;
+&lt;li&gt;&lt;a href=&quot;#details&quot; data-id=&quot;{{id}}&quot;&gt;{{name}}&lt;/a&gt;&lt;/li&gt;
+</pre></li>
+
+<li>
+<p>The details page layout consists of a header with a menu button, a list of application properties (icon, version, install date, and size), and a menu list (displayed after a click on the menu button in the header):</p>
+
+<pre class="prettyprint">
+&lt;div class=&quot;ui-page&quot; id=&quot;details&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header ui-has-more&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;App Manager&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button type=&quot;button&quot; class=&quot;ui-more ui-icon-overflow menu-drawer-handler&quot;&gt;&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;&lt;img id=&quot;icon&quot; alt=&quot;No icon&quot;/&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Version  &lt;div id=&quot;version&quot;&gt;&lt;/div&gt; &lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Install date  &lt;div id=&quot;install-date&quot;&gt;&lt;/div&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt;Size  &lt;div id=&quot;app-size&quot;&gt;&lt;/div&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;!--Square profile menu--&gt;
+&nbsp;&nbsp;&nbsp;&lt;div id=&quot;details-menu-popup&quot; class=&quot;ui-popup&quot; data-transition=&quot;slideup&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-header&quot;&gt;Actions&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;li&gt; &lt;a href=&quot;#&quot; class=&quot;option-button launch&quot;&gt;Launch&lt;/a&gt;&lt;/li&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&lt;!--Circle profile menu--&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-drawer menu-drawer&quot; data-drawer-target=&quot;#details&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;data-position=&quot;right&quot; data-enable=&quot;true&quot; data-drag-edge=&quot;1&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view-switcher&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-view custom-view&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;button class=&quot;option-button launch&quot;&gt;Launch&lt;/button&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&lt;/div&gt;
+</pre></li></ol>
+
+<h3>Installed Application Information</h3>
+
+<p>To get a list of installed applications:</p>
+
+<ol>
+<li>
+<p>In the apps module, define the <span style="font-family: Courier New,Courier,monospace">getApps()</span> method that determines whether the main page shows all applications or only the currently launched applications. The method gets the <span style="font-family: Courier New,Courier,monospace">filter</span> string that defines which applications are shown, and calls the <span style="font-family: Courier New,Courier,monospace">tizen.application.getAppsInfo()</span> method to retrieve the <span style="font-family: Courier New,Courier,monospace">ApplicationInformation</span> objects of the applicable applications:</p>
+<ul><li>If all applications are shown, they are retrieved in the success callback.</li>
+<li>If only launched applications are shown, they are retrieved in the <span style="font-family: Courier New,Courier,monospace">getLaunchedApps()</span> method.</li></ul>
+
+<pre class="prettyprint">
+/* js/models/apps.js */
+function getApps(filter, onSuccess, onError)
+{
+&nbsp;&nbsp;&nbsp;tizen.application.getAppsInfo(function onGetApps(apps)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (filter === &#39;all&#39;)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onSuccess(apps);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else if (filter === &#39;launched&#39;)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getLaunchedApps(apps, onSuccess);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onError(new Error(&#39;Wrong filter argument&#39;));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}, onError);
+}
+</pre>
+</li>
+
+<li>
+<p>With the <span style="font-family: Courier New,Courier,monospace">getLaunchedApps</span> method, filter the application list to show only currently launched applications.</p>
+<p>The method gets the <span style="font-family: Courier New,Courier,monospace">allApps</span> array of the <span style="font-family: Courier New,Courier,monospace">ApplicationInformation</span> objects as an input parameter. The <span style="font-family: Courier New,Courier,monospace">allApps</span> array contains the objects of all installed applications, and the method filters the array and returns only the currently launched applications.</p>
+
+<p>The filtering is performed with the <span style="font-family: Courier New,Courier,monospace">tizen.application.getAppsContext()</span> method, which gets the contexts of all launched applications.</p> 
+
+<pre class="prettyprint">
+/* js/models/apps.js */
+function getLaunchedApps(allApps, onSuccess)
+{
+&nbsp;&nbsp;&nbsp;tizen.application.getAppsContext(function onGetAppsContext(launchedAppsContexts)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var launchedApps = [],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appsLength = allApps.length,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;contextsLength = launchedAppsContexts.length,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;j = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app = null,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appContext = null;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; appsLength; i += 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;app = allApps[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; contextsLength; j += 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;appContext = launchedAppsContexts[j];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (appContext.appId === app.id &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;launchedApps.indexOf(app) === -1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;launchedApps.push(app);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onSuccess(launchedApps);
+&nbsp;&nbsp;&nbsp;});
+}
+</pre>
+</li>
+</ol>
+
+<p>To display information about the selected application on the details page:</p>
+
+<ol>
+<li>
+<p>In the apps module, define the <span style="font-family: Courier New,Courier,monospace">getApp()</span> method to retrieve the <span style="font-family: Courier New,Courier,monospace">ApplicationInformation</span> object of the application. The method gets the ID of the selected application as the <span style="font-family: Courier New,Courier,monospace">appId</span> input parameter.</p>
+
+<pre class="prettyprint">
+/* js/models/apps.js */
+function getApp(appId)
+{
+&nbsp;&nbsp;&nbsp;return tizen.application.getAppInfo(appId);
+}
+</pre>
+</li>
+
+<li>
+<p>Get all HTML elements that display the application information:</p>
+<pre class="prettyprint">
+/* js/views/details.js */
+var title = null,
+&nbsp;&nbsp;&nbsp;&nbsp;icon = null,
+&nbsp;&nbsp;&nbsp;&nbsp;version = null,
+&nbsp;&nbsp;&nbsp;&nbsp;installDate = null,
+&nbsp;&nbsp;&nbsp;&nbsp;appSize = null,
+&nbsp;&nbsp;&nbsp;&nbsp;page = null;
+
+function init()
+{
+&nbsp;&nbsp;&nbsp;page = document.getElementById(&#39;details&#39;);
+&nbsp;&nbsp;&nbsp;title = document.querySelector(&#39;#details header h2&#39;);
+&nbsp;&nbsp;&nbsp;icon = document.getElementById(&#39;icon&#39;);
+&nbsp;&nbsp;&nbsp;version = document.getElementById(&#39;version&#39;);
+&nbsp;&nbsp;&nbsp;installDate = document.getElementById(&#39;install-date&#39;);
+&nbsp;&nbsp;&nbsp;appSize = document.getElementById(&#39;app-size&#39;);
+}
+</pre>
+</li>
+
+<li>
+<p>Display the application details on the details page by filling the HTML elements with the data retrieved from the <span style="font-family: Courier New,Courier,monospace">ApplicationInformation</span> object of the selected application:</p>
+
+<pre class="prettyprint">
+/* js/views/details.js */
+app = apps.getApp(e.detail); /* e.detail = application ID */
+title.innerText = app.name;
+icon.src = app.iconPath;
+version.innerText = app.version;
+installDate.innerText = formatDate(app.installDate);
+appSize.innerText = app.size ? formatSize(app.size) : &#39;unknown&#39;;
+/* formatDate and formatSize are helper functions */
+</pre>
+<p>The <span style="font-family: Courier New,Courier,monospace">apps</span> object is an instance of the apps module defined in the <span style="font-family: Courier New,Courier,monospace">js/models/apps.js</span> file.</p>
+</li>
+
+</ol>
+
+<h3>Application Launch</h3>
+
+<p>To launch the selected application from the details page menu:</p>
+
+<ol>
+
+<li>
+<p>In the apps module, define the <span style="font-family: Courier New,Courier,monospace">launch()</span> method that launches the selected application. The <span style="font-family: Courier New,Courier,monospace">appId</span> input parameter defines the application ID of the application to be launched.</p>
+
+<pre class="prettyprint">
+/* js/models/apps.js */
+function launch(appId, onSuccess, onError)
+{
+&nbsp;&nbsp;&nbsp;tizen.application.launch(appId, onSuccess, onError);
+}
+</pre>
+</li>
+
+<li>
+<p>In the details module, call the <span style="font-family: Courier New,Courier,monospace">launch()</span> method when the user selects the launch from the menu:</p>
+<pre class="prettyprint">
+/* js/views/details.js */
+function onLaunchClick()
+{
+&nbsp;&nbsp;&nbsp;apps.launch(app.id, onLaunchSuccess, onLaunchError);
+}
+</pre>
+<p>The success callback (<span style="font-family: Courier New,Courier,monospace">onLaunchSuccess</span>) displays an information popup stating that the application is launched and the error callback (<span style="font-family: Courier New,Courier,monospace">onLaunchError</span>) displays an error message popup.</p>
+</li>
+
+</ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/wearable_w/heartratemonitor_ww.htm b/org.tizen.sampledescriptions/html/wearable_w/heartratemonitor_ww.htm
new file mode 100644 (file)
index 0000000..01f8520
--- /dev/null
@@ -0,0 +1,702 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+    <script type="text/javascript" src="../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+    <title>HeartRateMonitor Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Wearable Web" src="../images/wearable_s_w.png"/></p>
+    </div>
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../org.tizen.guides/html/web/tizen/system/sensor_w.htm">Sensor Guide</a></li>
+            <li><a href="../../../org.tizen.web.apireference/html/device_api/wearable/tizen/sensor.html">Sensor API</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>HeartRateMonitor Sample Overview</h1>
+
+<p>The HeartRateMonitor sample application demonstrates how you can measure the user&#39;s current heart rate.</p>
+<p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+<p>The following figure illustrates the main screens of the HeartRateMonitor.</p>
+<p class="figure">Figure: HeartRateMonitor screens</p>
+<p align="center"><img alt="HeartRateMonitor screens" src="../images/heartratemonitor_screen_1_ww.png" /> <img alt="HeartRateMonitor screens" src="../images/heartratemonitor_screen_2_ww.png" /></p>
+<p align="center"><img alt="HeartRateMonitor screens" src="../images/heartratemonitor_screen_3_ww.png" /> <img alt="HeartRateMonitor screens" src="../images/heartratemonitor_screen_4_ww.png" /></p>
+<p>The application opens with the main screen that shows the heart rate being measured. After the measurement is complete,  the current heart rate is displayed.</p>
+<p>The heart image in the background is animated to beat in sync with the measured heart rate. The application continues to measure the heart rate and update the heart rate value and animation accordingly. If the application cannot measure the heart rate, an information screen is shown after 10 seconds.</p>
+
+<p>You can set a limit for the heart rate:</p>
+<ol><li>On the main screen, click <strong>Settings</strong>.</li>
+<li>Use a slider to define a limit you want monitor, and click <strong>OK</strong>.
+<p>The defined limit is shown in the top right corner of the main screen, under the header.</p></li></ol>
+
+<p>If the measured heart rate exceeds the limit, the application background turns red and the device starts vibrating for 20 seconds. The vibration happens in 1-second bursts separated by 1-second pauses.</p>
+
+<h2>Prerequisites</h2>
+
+<ul>
+       <li>Device must have a heart rate sensor, or you must use the Emulator.</li>
+       <li>To ensure proper application execution, the following privileges must be set:
+               <ul>
+               <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/healthinfo</span></li>
+               <li><span style="font-family: Courier New,Courier,monospace">http://developer.samsung.com/privilege/healthinfo</span></li>
+               </ul>
+       </li>
+</ul>
+
+<h2>Source Files</h2>
+
+<p>You can create and view the sample application project including the source files in the IDE.</p>
+
+<p>The application uses a simple Model View (MV) architecture. The core part determines the architecture, and the application part determines the application behavior. The <span style="font-family: Courier New,Courier,monospace">core.js</span> file implements a simple Asynchronous Module Definition (AMD) and specifies how modules are defined.</p>
+
+<table border="1">
+    <tbody>
+        <tr>
+            <th>File name</th>
+            <th>Description</th>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+            <td>This file contains the application configuration.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+            <td>This file contains the CSS styling for the application UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">images/</span></td>
+            <td>This directory contains the images used to create the application UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+            <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/app.js</span></td>
+            <td>This file starts the application.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/core</span></td>
+            <td>This directory contains the application framework.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/core/core.js</span></td>
+            <td>This file contains the functions for defining modules.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/helpers/vibration.js</span></td>
+            <td>This file contains the helper functions for starting and stopping device vibration.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/models/heartRate.js</span></td>
+            <td>This file contains the module for managing the heart rate sensor.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/init.js</span></td>
+            <td>This file contains the functions responsible for the view of the application, and the back key and low battery handling.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/main.js</span></td>
+            <td>This file contains the functions for handling the application behavior.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/page/init.js</span></td>
+            <td>This file defines the application UI and handles the interaction with the user.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">lib/tau</span></td>
+            <td>This directory contains the TAU library files.</td>
+        </tr>
+    </tbody>
+</table>
+
+
+<h2>Implementation</h2>
+
+<h3>Defining the Application Layout</h3>
+
+<p>The application has 2 screens, whose content is defined in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file:</p>
+<ul>
+    <li><p>Main screen shows the current heart rate.</p>
+<p>The screen layout consists of a header section with the application name, a content section with <span style="font-family: Courier New,Courier,monospace">&lt;div&gt;</span> elements for displaying the current heart rate, defined limit, measuring time, and the heart image, and a footer section with the <strong>Settings</strong> button. The screen also has a <span style="font-family: Courier New,Courier,monospace">setting-popup</span> popup element used to define the limit.</p>
+
+<p>The <span style="font-family: Courier New,Courier,monospace">views/main.js</span> file defines the screen behavior.</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&nbsp;&nbsp;&nbsp;&lt;head&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta charset=&quot;utf-8&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta name=&quot;description&quot; content=&quot;HeartRateMonitor&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Heart Rate Monitor&lt;/title&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel=&quot;stylesheet&quot; href=&quot;lib/tau/wearable/theme/default/tau.css&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel=&quot;stylesheet&quot; media=&quot;all and (-tizen-geometric-shape: circle)&quot; href=&quot;lib/tau/wearable/theme/default/tau.circle.min.css&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;./css/style.css&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&lt;/head&gt;
+&nbsp;&nbsp;&nbsp;&lt;body&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;main&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Heart Rate Monitor&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;heart-rate-value&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;heart&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;heart-img&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;limit-info&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Heart rate limit: &lt;span id=&quot;limit-info-value&quot;&gt;&lt;/span&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;measuring-info&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Measuring...
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;footer class=&quot;ui-footer ui-bottom-button&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a href=&quot;#settings-popup&quot; data-rel=&quot;popup&quot; class=&quot;ui-btn&quot;&gt;Settings&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/footer&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;settings-popup&quot; class=&quot;ui-popup&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set heart rate limit.
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;settings-heartrate&quot;&gt;&lt;input id=&quot;settings-heartrate-value&quot; type=&quot;text&quot; value=&quot;&quot; maxlength=&quot;3&quot; disabled/&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;settings-slider&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;input id=&quot;slider&quot; type=&quot;range&quot; min=&quot;1&quot; max=&quot;220&quot; value=&quot;&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-popup-footer ui-side-button ui-grid-col-2&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;cancel-popup-btn&quot; href=&quot;#&quot; class=&quot;ui-btn btn-icon-cancel&quot; data-rel=&quot;back&quot;&gt;Cancel&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;ok-popup-btn&quot; href=&quot;#&quot; class=&quot;ui-btn btn-icon-check&quot; data-rel=&quot;back&quot;&gt;OK&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=&quot;./lib/tau/wearable/js/tau.js&quot;&gt;&lt;/script&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=&quot;./js/core/core.js&quot; data-main=&quot;./js/app.js&quot;&gt;&lt;/script&gt;
+&nbsp;&nbsp;&nbsp;&lt;/body&gt;
+&lt;/html&gt;
+</pre>
+       </li>
+    <li><p>Information screen shows an instruction if the application cannot measure the heart rate.</p>
+
+
+<p>The screen layout consists of a header section with the screen title, a content section with instructions in case the heart rate cannot be measured, and a footer with the <strong>Back</strong> button:</p>        
+       
+       <pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page&quot; id=&quot;info&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;HRM Info&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div class=&quot;info-text&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try again. Clean the sensor, then attach Gear snugly to top or under side of wrist, not against the bone. Be still and quiet.
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;footer class=&quot;ui-footer ui-bottom-button&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;info-back-btn&quot; class=&quot;ui-btn&quot;&gt;Back&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;/footer&gt;
+&lt;/div&gt;
+</pre>
+       </li>
+</ul>
+
+<h3>Monitoring the Heart Rate</h3>
+
+<p>To define a heart rate module that provides processed heart rate data from the Sensor API:</p>
+
+<ol><li>
+<p>Define an empty module:</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+define(
+{
+&nbsp;&nbsp;&nbsp;name: &#39;models/heartRate&#39;,
+&nbsp;&nbsp;&nbsp;requires: 
+&nbsp;&nbsp;&nbsp;[
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;core/event&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;core/storage/idb&#39;
+&nbsp;&nbsp;&nbsp;],
+&nbsp;&nbsp;&nbsp;def: function modelsHeartRate(req)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implementation */
+&nbsp;&nbsp;&nbsp;}
+});
+</pre></li>
+
+<li>
+<p>Create the required variables:</p>
+<ul><li><span style="font-family: Courier New,Courier,monospace">heartRateData</span> represents the heart rate monitor data. It contains a rate numeric field that contains the current heart rate value.</li>
+<li><span style="font-family: Courier New,Courier,monospace">heartRate</span> is a reference to the heart rate sensor.</li></ul>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+var heartRateData = {};
+var heartRate = null;
+</pre></li>
+
+<li>
+<p>Define the <span style="font-family: Courier New,Courier,monospace">resetData()</span> method, which cleans the <span style="font-family: Courier New,Courier,monospace">heartRateData</span> object:</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+function resetData() 
+{
+&nbsp;&nbsp;&nbsp;heartRateData = 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rate: &#39;-&#39;
+&nbsp;&nbsp;&nbsp;};
+}
+</pre>
+</li>
+
+<li>
+<p>Define the <span style="font-family: Courier New,Courier,monospace">init()</span> method, which initializes the heart rate module:</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+function init()
+{
+&nbsp;&nbsp;&nbsp;resetData();
+&nbsp;&nbsp;&nbsp;/* Initialize the heart rate limit */
+
+&nbsp;&nbsp;&nbsp;heartRate = (tizen &amp;&amp; tizen.humanactivitymonitor) ||
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(window.webapis &amp;&amp; window.webapis.motion) ||
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;null;
+}
+</pre></li>
+
+<li>
+<p>Define the <span style="font-family: Courier New,Courier,monospace">start()</span> method, which starts reading data from the sensor.</p>
+<p>The <span style="font-family: Courier New,Courier,monospace">init()</span> method from the main module calls the <span style="font-family: Courier New,Courier,monospace">start()</span> method during the main module initialization.</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+var CONTEXT_TYPE = &#39;HRM&#39;;
+
+function start()
+{
+&nbsp;&nbsp;&nbsp;resetData();
+&nbsp;&nbsp;&nbsp;heartRate.start(CONTEXT_TYPE, function onSuccess(heartRateInfo)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;handleHeartRateInfo(heartRateInfo);
+&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;function onError(error)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.log(&#39;error: &#39;, error.message);
+&nbsp;&nbsp;&nbsp;});
+}
+
+/* js/views/main.js */   
+function init() 
+{
+&nbsp;&nbsp;&nbsp;heartRate.start();
+&nbsp;&nbsp;&nbsp;/* Other actions */
+}
+</pre></li>
+
+<li>
+<p>The <span style="font-family: Courier New,Courier,monospace">start()</span> method success callback calls the <span style="font-family: Courier New,Courier,monospace">handleHeartRateInfo()</span> method, which stores the received data in the <span style="font-family: Courier New,Courier,monospace">heartRateData</span> object and fires a change event using the event module from the Core framework:</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+function setHeartRateData(heartRateInfo) 
+{
+&nbsp;&nbsp;&nbsp;var pData = 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;rate: heartRateInfo.heartRate
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;heartRateData = pData;
+
+&nbsp;&nbsp;&nbsp;return pData;
+}
+
+function getData()
+{
+&nbsp;&nbsp;&nbsp;return heartRateData;
+}
+
+function handleHeartRateInfo(heartRateInfo)
+{
+&nbsp;&nbsp;&nbsp;setHeartRateData(heartRateInfo);
+
+&nbsp;&nbsp;&nbsp;ev.fire(&#39;change&#39;, getData());
+}
+</pre></li>
+
+<li>
+<p>When the application terminates (after the user presses the <strong>back</strong> key on the main screen), the back key event handler calls the <span style="font-family: Courier New,Courier,monospace">stop()</span> method in the heart rate module. The <span style="font-family: Courier New,Courier,monospace">stop()</span> method stops the sensor and unregisters the previously registered listener.</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+function stop()
+{
+&nbsp;&nbsp;&nbsp;heartRate.stop(CONTEXT_TYPE);
+}
+
+/* js/views/init.js */        
+var hr = req.models.heartRate;
+
+function onHardwareKeysTap(ev) 
+{
+&nbsp;&nbsp;&nbsp;/* Other actions */
+&nbsp;&nbsp;&nbsp;hr.stop();
+&nbsp;&nbsp;&nbsp;/* Other actions */
+}
+</pre></li>
+</ol>
+
+<h3>Setting and Storing the Heart Rate Limit</h3>
+
+<p>The heart rate module exports methods for setting and getting the limit value from the storage.</p>
+
+<p>To manage the heart rate limit value:</p>
+
+<ol><li>When reading from or writing to the storage, the <span style="font-family: Courier New,Courier,monospace">core.storage.idb.write</span> and <span style="font-family: Courier New,Courier,monospace">core.storage.idb.read</span> events are triggered:
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+var st = req.core.storage.idb,
+&nbsp;&nbsp;&nbsp;&nbsp;STORAGE_IDB_KEY = &#39;limit&#39;;
+
+function getLimit()
+{
+&nbsp;&nbsp;&nbsp;st.get(STORAGE_IDB_KEY);
+}
+
+function setLimit(value)
+{
+&nbsp;&nbsp;&nbsp;st.set(STORAGE_IDB_KEY, value);
+}
+
+ev.on(
+{
+&nbsp;&nbsp;&nbsp;&#39;core.storage.idb.write&#39;: onWriteLimit,
+&nbsp;&nbsp;&nbsp;&#39;core.storage.idb.read&#39;: onReadLimit
+});
+</pre></li>
+
+<li>The storage writing and reading operations are asynchronous, and the event module from the Core framework calls callbacks when the operations are completed.
+<p>The events are handled by the <span style="font-family: Courier New,Courier,monospace">onWriteLimit()</span> and <span style="font-family: Courier New,Courier,monospace">onReadLimit()</span> callback methods. These methods trigger the <span style="font-family: Courier New,Courier,monospace">models.heartRate.setLimit</span> and <span style="font-family: Courier New,Courier,monospace">models.heartRate.getLimit</span> events to notify the view that the operations are completed.</p>
+
+<pre class="prettyprint">
+/* js/models/heartRate.js */
+function onWriteLimit()
+{
+&nbsp;&nbsp;&nbsp;ev.fire(&#39;setLimit&#39;);
+}
+
+function onReadLimit(e)
+{
+&nbsp;&nbsp;&nbsp;ev.fire(&#39;getLimit&#39;, e);
+}
+</pre></li>
+</ol>
+
+<h3>Monitoring the Heart Rate Limit</h3>
+
+<p>When the heart rate exceeds the defined limit, the application background changes and the device vibrates.</p>
+
+<p>To monitor the limit:</p>
+
+<ol><li>
+<p>Use the <span style="font-family: Courier New,Courier,monospace">bindEvents()</span> method to register the event listeners for when the user sets a new limit.</p>
+<p>The asynchronous <span style="font-family: Courier New,Courier,monospace">heartRate.setLimit()</span> method stores the new limit value and fires the <span style="font-family: Courier New,Courier,monospace">models.heartRate.setLimit()</span> event.</p>
+
+<pre class="prettyprint">
+/* js/views/main.js */
+var HRLimit = null, /* Heart rate limit value */
+&nbsp;&nbsp;&nbsp;&nbsp;heartRate = null, /* Reference to the heartRate module */
+&nbsp;&nbsp;&nbsp;&nbsp;okPopupBtn = null; /* Reference to the popup button */
+
+function onOkPopupBtnClick()
+{
+&nbsp;&nbsp;&nbsp;HRLimit = settingsHeartrateValue.value;
+&nbsp;&nbsp;&nbsp;heartRate.setLimit(HRLimit);
+}
+
+function bindEvents()
+{
+&nbsp;&nbsp;&nbsp;okPopupBtn = document.getElementById(&#39;ok-popup-btn&#39;);
+&nbsp;&nbsp;&nbsp;okPopupBtn.addEventListener(&#39;click&#39;, onOkPopupBtnClick);
+}
+</pre></li>
+
+<li>Implement and register the <span style="font-family: Courier New,Courier,monospace">models.heartRate.setLimit</span> listener. The <span style="font-family: Courier New,Courier,monospace">OnSetLimit()</span> method calls the asynchronous <span style="font-family: Courier New,Courier,monospace">heartRate.getLimit()</span> method, which fires the <span style="font-family: Courier New,Courier,monospace">models.heartRategsetLimit</span> event.
+
+<pre class="prettyprint">
+/* js/views/main.js */
+function onSetLimit() 
+{
+&nbsp;&nbsp;&nbsp;heartRate.getLimit();
+}
+
+ev.on(
+{
+&nbsp;&nbsp;&nbsp;&#39;models.heartRate.setLimit&#39;: onSetLimit
+});
+</pre></li>
+
+<li>Implement and register the <span style="font-family: Courier New,Courier,monospace">models.heartRate.getLimit</span> listener to update the UI:
+
+<pre class="prettyprint">
+/* js/views/main.js */
+var settingsHeartrateValue = null, /* Text input element for set heart rate limit value */
+&nbsp;&nbsp;&nbsp;&nbsp;limitInfoValue = null, /* Text element showing the set heart rate limit value */
+&nbsp;&nbsp;&nbsp;&nbsp;slider = null, /* Slider input element for changing heart rate limit value */
+&nbsp;&nbsp;&nbsp;&nbsp;HRLimit = null; /* Heart rate limit */
+
+function onGetLimit(e)
+{
+&nbsp;&nbsp;&nbsp;var limit = e.detail.value;
+
+&nbsp;&nbsp;&nbsp;if (limit === undefined)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;limit = HRLimit;
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;settingsHeartrateValue.value = limit;
+&nbsp;&nbsp;&nbsp;limitInfoValue.innerHTML = limit;
+&nbsp;&nbsp;&nbsp;slider.value = limit;
+&nbsp;&nbsp;&nbsp;HRLimit = limit;
+
+&nbsp;&nbsp;&nbsp;setLimitExceeded(currentRate &gt; HRLimit);
+}
+
+ev.on(
+{
+&nbsp;&nbsp;&nbsp;&#39;models.heartRate.getLimit&#39;: onGetLimit
+});
+</pre></li>
+
+<li>
+<p>The <span style="font-family: Courier New,Courier,monospace">setLimitExceeded()</span> method checks whether the current heart rate is higher than the set limit. If the limit is lower than the measured heart rate, the main screen gets a new CSS style class which changes its background color to red and the device starts to vibrate. Otherwise, the CSS style class is removed.</p>
+
+<pre class="prettyprint">
+/* js/views/main.js */
+var page = null, /* Reference to the main screen element */
+&nbsp;&nbsp;&nbsp;&nbsp;vibration = null; /* Reference to the vibration module */
+
+function setLimitExceeded(exceeded)
+{
+&nbsp;&nbsp;&nbsp;if (exceeded)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.classList.add(&#39;limit-exceeded&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration.start();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;page.classList.remove(&#39;limit-exceeded&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vibration.stop();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+
+<li>
+<p>The application starts and stops the device vibration at 1-second intervals using the <span style="font-family: Courier New,Courier,monospace">helpers/vibration</span> module. To implement the vibration module:</p>
+
+<ol type="a"><li>Define the vibration module:
+
+<pre class="prettyprint">
+/* js/helpers/vibration.js */
+define(
+{
+&nbsp;&nbsp;&nbsp;name: &#39;helpers/vibration&#39;,
+&nbsp;&nbsp;&nbsp;def: function vibrationModule()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Variables */
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function vibrate() 
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Implement the vibration */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function start()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Start the vibration */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function stop()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Stop the vibration */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start: start,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;stop: stop
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;};
+&nbsp;&nbsp;&nbsp;}
+});
+</pre></li>
+
+<li>Define the <span style="font-family: Courier New,Courier,monospace">vibrate()</span> method, which starts the device vibration and stops it when the time has passed:
+
+<pre class="prettyprint">
+/* js/helpers/vibration.js */
+var launchTimestamp = 0, /* Vibration launch time */
+&nbsp;&nbsp;&nbsp;&nbsp;/* Duration of the whole process */
+&nbsp;&nbsp;&nbsp;&nbsp;/* After this time vibration is stopped even without stop method call */
+&nbsp;&nbsp;&nbsp;&nbsp;PROCESS_DURATION = 20000, 
+&nbsp;&nbsp;&nbsp;&nbsp;intervalId = 0, /* Vibration interval task ID */
+&nbsp;&nbsp;&nbsp;&nbsp;VIBRATION_DURATION = 1000; /* Duration of vibration step */
+
+function vibrate() 
+{
+&nbsp;&nbsp;&nbsp;var stopTime = launchTimestamp + PROCESS_DURATION, currentTime = new Date().getTime();
+
+&nbsp;&nbsp;&nbsp;if (currentTime &gt; stopTime) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(intervalId);
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;navigator.vibrate(VIBRATION_DURATION);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+
+<li>Define the <span style="font-family: Courier New,Courier,monospace">start()</span> method, which starts the vibration process:
+
+<pre class="prettyprint">
+/* js/helpers/vibration.js */
+function start()
+{
+&nbsp;&nbsp;&nbsp;if (intervalId === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intervalId = setInterval(vibrate, VIBRATION_DURATION + PAUSE_DURATION);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;launchTimestamp = new Date().getTime();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+
+<li>Define the <span style="font-family: Courier New,Courier,monospace">stop()</span> method, which stops the vibration process:
+
+<pre class="prettyprint">
+/* js/helpers/vibration.js */
+function stop()
+{
+&nbsp;&nbsp;&nbsp;if (intervalId !== 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(intervalId);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;intervalId = 0;
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ol></li></ol>
+
+<h3>Calculating the Beat for the Heart Image</h3>
+
+<p>The speed of the heart image animation depends on the current heart rate, and it is recalculated every time the heart rate value changes:</p>
+
+<ol><li>
+<p>The default duration of 1 animation of 2 heart beats lasts 1.5 seconds. When the heart rate changes, 120 is divided by the current heart rate and rounded to one digit after the decimal place to determine the new duration.</p>
+
+<pre class="prettyprint">
+/* js/views/main.js */
+function onHeartRateDataChange(heartRateInfo) 
+{
+&nbsp;&nbsp;&nbsp;var rate = heartRateInfo.detail.rate,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activePage = document.getElementsByClassName('ui-page-active')[0],
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activePageId = activePage ? activePage.id : '';
+
+&nbsp;&nbsp;&nbsp;updateAnimationDuration(rate);
+&nbsp;&nbsp;&nbsp;setLimitExceeded(rate &gt; HRLimit);
+}
+
+function updateAnimationDuration(rate) 
+{
+&nbsp;&nbsp;&nbsp;var animationDuration = &#39;1.5&#39;;
+
+&nbsp;&nbsp;&nbsp;if (rate &lt; 1) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animationDuration = 0;
+&nbsp;&nbsp;&nbsp;} 
+&nbsp;&nbsp;&nbsp;else 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animationDuration = (120 / rate).toFixed(1);
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (animationDuration !== currentAnimationDuration) 
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;heartImg.style.webkitAnimationDuration = animationDuration + &#39;s&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentAnimationDuration = animationDuration;
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+<li>
+<p>The CSS style file shows how each animation contains 2 heart beats:</p>
+
+<pre class="prettyprint">
+/* css/style.css */
+heart-img
+{
+&nbsp;&nbsp;&nbsp;margin: 5% auto;
+&nbsp;&nbsp;&nbsp;background-image: url(&quot;../images/heart.png&quot;);
+&nbsp;&nbsp;&nbsp;background-position: center;
+&nbsp;&nbsp;&nbsp;background-size: cover;
+&nbsp;&nbsp;&nbsp;width: 60%;
+&nbsp;&nbsp;&nbsp;height: 60%;
+}
+
+.animate
+{
+&nbsp;&nbsp;&nbsp;-webkit-animation: heartMove 1.5s infinite;
+}
+
+@-webkit-keyframes heartMove
+{
+&nbsp;&nbsp;&nbsp;0%, 50%, 100%
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 45%;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 45%;
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;25%, 75%
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;width: 60%;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;height: 60%;
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ol>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/wearable_w/puzzle_ww.htm b/org.tizen.sampledescriptions/html/wearable_w/puzzle_ww.htm
new file mode 100644 (file)
index 0000000..16bd58d
--- /dev/null
@@ -0,0 +1,654 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+    <script type="text/javascript" src="../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+    <title>Puzzle Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Wearable Web" src="../images/wearable_s_w.png"/></p>
+    </div>
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../org.tizen.guides/html/web/tizen/system/system_info_w.htm">System Information Guide</a></li>
+                <li><a href="../../../org.tizen.web.apireference/html/device_api/wearable/tizen/systeminfo.html">System Information API</a></li>
+          <li><a href="../../../org.tizen.web.apireference/html/device_api/wearable/tizen/application.html">Application API</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>Puzzle Sample Overview</h1>
+
+<p>The Puzzle sample application demonstrates how you can create a puzzle game.</p>
+<p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+<p>The following figure illustrates the main screen of the Puzzle.</p>
+<p class="figure">Figure: Puzzle screen</p>
+<p align="center"><img alt="Puzzle screen" src="../images/puzzle_screen_1_ww.png" /> <img alt="Puzzle screen" src="../images/puzzle_screen_2_ww.png" /> <img alt="Puzzle screen" src="../images/puzzle_screen_3_ww.png" /></p> 
+<p align="center"><img alt="Background" src="../images/puzzle_background_ww.png" /></p>
+<p>The application opens with the main screen that shows a randomly selected image divided into 16 mixed-up pieces. Originally, the piece from the bottom right corner is removed to allow shifting the other pieces.</p>
+<p>When the user taps a piece, it is moved to the location of the empty piece. The purpose of the game is to put all pieces in their right locations; when the game is solved, the full image is displayed.</p> 
+
+<h2>Source Files</h2>
+
+<p>You can create and view the sample application project including the source files in the IDE.</p>
+
+<table border="1">
+    <tbody>
+        <tr>
+            <th>File name</th>
+            <th>Description</th>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+            <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+            <td>This file contains the CSS styling for the application UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">img/</span></td>
+            <td>This directory contains the application images used as the puzzle image and application icon.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+            <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/main.js</span></td>
+            <td>This file contains the code for the main application module used for initialization.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/systeminfo.js</span></td>
+            <td>This file contains the battery state handling code.</td>
+        </tr>
+    </tbody>
+</table>
+
+
+<h2>Implementation</h2>
+
+<h3>Defining the Application Layout</h3>
+
+<p>To define the application layout and initialize the game screen:</p>
+
+<ol><li>
+<p>The application has only 1 page, and the static page structure is defined in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file. The selected image is placed in the <span style="font-family: Courier New,Courier,monospace">game</span> element. The element styles are specified in the <span style="font-family: Courier New,Courier,monospace">css/style.css</span> file. </p>
+
+<pre class="prettyprint">
+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&nbsp;&nbsp;&nbsp;&lt;head&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta charset=&quot;utf-8&quot; /&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;meta name=&quot;viewport&quot; content=&quot;width=device-width,height=device-height,user-scalable=no&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;title&gt;Puzzle&lt;/title&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;css/style.css&quot;/&gt;
+&nbsp;&nbsp;&nbsp;&lt;/head&gt;
+&nbsp;&nbsp;&nbsp;&lt;body&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;transparent&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;game&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;background&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;div id=&quot;pieces&quot;&gt;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=&quot;js/systeminfo.js&quot;&gt;&lt;/script&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;script src=&quot;js/main.js&quot;&gt;&lt;/script&gt;
+&nbsp;&nbsp;&nbsp;&lt;/body&gt;
+&lt;/html&gt;
+</pre></li>
+
+<li>
+<p>On a circular screen, a faded copy of selected image is also used as a background, as defined in the <span style="font-family: Courier New,Courier,monospace">css/style.css</span> file:</p>
+
+<pre class="prettyprint">
+#transparent
+{
+&nbsp;&nbsp;&nbsp;position: absolute;
+&nbsp;&nbsp;&nbsp;left: 0;
+&nbsp;&nbsp;&nbsp;right: 0;
+&nbsp;&nbsp;&nbsp;top: 0;
+&nbsp;&nbsp;&nbsp;bottom: 0;
+&nbsp;&nbsp;&nbsp;opacity: .5;
+}
+
+#background
+{
+&nbsp;&nbsp;&nbsp;position: absolute;
+&nbsp;&nbsp;&nbsp;left: 0;
+&nbsp;&nbsp;&nbsp;top: 0;
+&nbsp;&nbsp;&nbsp;display: none;
+&nbsp;&nbsp;&nbsp;background-position: center center;
+&nbsp;&nbsp;&nbsp;width: 100%;
+&nbsp;&nbsp;&nbsp;height: 100%;
+&nbsp;&nbsp;&nbsp;opacity: 0.1;
+&nbsp;&nbsp;&nbsp;-webkit-filter: invert(100%);
+}
+</pre></li>
+
+<li>The <span style="font-family: Courier New,Courier,monospace">main</span> module is responsible for the puzzle logic and for managing the UI. It updates the UI, listens to events, and initializes the systeminfo module responsible for checking the battery level. This module sets a random image to the puzzle and splits it to pieces, shuffles the pieces, and handles the tap event on puzzle pieces and animations.
+<p>After initializing the main module, the application is ready for use and waits for user actions.</p>
+<p>The <span style="font-family: Courier New,Courier,monospace">init()</span> method initializes the game and binds events for the <strong>back</strong> key presses and tapping on a puzzle piece:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function init()
+{
+&nbsp;&nbsp;&nbsp;adjustGameElement();
+&nbsp;&nbsp;&nbsp;holdRestart();
+
+&nbsp;&nbsp;&nbsp;/* Add event listener for the back key */
+&nbsp;&nbsp;&nbsp;document.addEventListener(&#39;tizenhwkey&#39;, function onTizenhwkey(e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (e.keyName === &#39;back&#39; &amp;&amp; !!systeminfo)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systeminfo.closeApplication();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;});
+
+&nbsp;&nbsp;&nbsp;document.getElementById(&#39;pieces&#39;).addEventListener(&#39;click&#39;, function movePiece(event)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (event.target.classList.contains(&#39;piece&#39;))
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changePiecePosition(event.target);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;});
+}
+</pre></li>
+
+<li><p>The <span style="font-family: Courier New,Courier,monospace">adjustGameElement()</span> method sets the piece size and position:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function adjustGameElement()
+{
+&nbsp;&nbsp;&nbsp;if (isScreenCircular)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adjustGameElementForCircularScreen();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;adjustGameElementForRectangularScreen();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<p>It is necessary to determine the screen type (circular or rectangle), and calculate the piece size and update game board element size accordingly. On a circular screen, the puzzle board is adjusted to be a square inscribed in a circle.</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function adjustGameElementForRectangularScreen()
+{
+&nbsp;&nbsp;&nbsp;gameEl.style.height = window.innerHeight + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;pieceWidth = Math.floor(resolution.width / grid.x);
+&nbsp;&nbsp;&nbsp;pieceHeight = Math.floor(resolution.height / grid.y);
+}
+
+function adjustGameElementForCircularScreen()
+{
+&nbsp;&nbsp;&nbsp;var sideLength = Math.floor(window.innerHeight / Math.sqrt(2));
+&nbsp;&nbsp;&nbsp;gameElOffset = Math.floor((window.innerWidth - sideLength) / 2);
+
+&nbsp;&nbsp;&nbsp;pieceWidth = Math.floor(sideLength / grid.x);
+&nbsp;&nbsp;&nbsp;pieceHeight = Math.floor(sideLength / grid.y);
+
+&nbsp;&nbsp;&nbsp;gameEl.style.width = pieceWidth * grid.x + 1 + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;gameEl.style.height = pieceHeight * grid.y + 1 + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;gameEl.style.marginLeft = gameElOffset + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;gameEl.style.marginTop = gameElOffset + &#39;px&#39;;
+}
+</pre></li>
+
+<li>
+<p>The user can restart the game by tapping on the game board and holding the tap for a time that is longer than the <span style="font-family: Courier New,Courier,monospace">HOLD_TIME</span> constant value:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function holdRestart()
+{
+&nbsp;&nbsp;&nbsp;gameEl.addEventListener(&#39;touchstart&#39;, onHoldStart);
+}
+
+function onHoldStart(event)
+{
+&nbsp;&nbsp;&nbsp;var startTime = new Date().getTime(),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touchEnd = function touchEnd()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;gameEl.removeEventListener(&#39;touchend&#39;, touchEnd);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onHoldEnd(startTime);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;touches = event.touches.length;
+
+&nbsp;&nbsp;&nbsp;/* Prevent reset during a single-touch hold */
+&nbsp;&nbsp;&nbsp;singleTouch = touches &lt; 2;
+
+&nbsp;&nbsp;&nbsp;gameEl.addEventListener(&#39;touchend&#39;, touchEnd);
+}
+
+function onHoldEnd(startTime)
+{
+&nbsp;&nbsp;&nbsp;var endTime = new Date().getTime();
+&nbsp;&nbsp;&nbsp;if ((endTime - startTime) &gt; HOLD_TIME)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (interval !== null || singleTouch === true)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do not restart if shuffling in progress */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Single-touch hold must not cause restart (2nd condition) */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+
+<li>
+<p>Start the game with the <span style="font-family: Courier New,Courier,monospace">start()</span> method:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function start(firstStart)
+{
+&nbsp;&nbsp;&nbsp;transparentEl.classList.remove(&#39;opaque&#39;);
+&nbsp;&nbsp;&nbsp;clearGame();
+&nbsp;&nbsp;&nbsp;setFile();
+&nbsp;&nbsp;&nbsp;setBackground();
+&nbsp;&nbsp;&nbsp;setFree(grid.x - 1, grid.y - 1);
+&nbsp;&nbsp;&nbsp;createPieces();
+&nbsp;&nbsp;&nbsp;shufflePieces();
+&nbsp;&nbsp;&nbsp;if (firstStart === true)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;systeminfo.init();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+<li>
+<p>At the end, clear the game board (remove all pieces) with the <span style="font-family: Courier New,Courier,monospace">clearGame()</span> method:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function clearGame()
+{
+&nbsp;&nbsp;&nbsp;lock = false;
+&nbsp;&nbsp;&nbsp;clearInterval(interval);
+&nbsp;&nbsp;&nbsp;var pieces = document.getElementsByClassName(&#39;piece&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i = pieces.length;
+
+&nbsp;&nbsp;&nbsp;while (i)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;i -= 1;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pieces[i].remove();
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li></ol>
+
+<h3>Selecting the Puzzle Image</h3>
+
+<p>The <span style="font-family: Courier New,Courier,monospace">setFile()</span> method gets a random file from the <span style="font-family: Courier New,Courier,monospace">images/</span> folder and sets the file path to the <span style="font-family: Courier New,Courier,monospace">file</span> variable:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function setFile()
+{
+&nbsp;&nbsp;&nbsp;file = &#39;images/&#39; + resolution.width + &#39;x&#39; + resolution.height + &#39;/&#39; +
+&nbsp;&nbsp;&nbsp;randomFile();
+}
+
+function randomFile()
+{
+&nbsp;&nbsp;&nbsp;var random = Math.floor(Math.random() * images.length);
+
+&nbsp;&nbsp;&nbsp;if (images.length === 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return images[0];
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;if (random === lastRandom)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return randomFile();
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;lastRandom = random;
+
+&nbsp;&nbsp;&nbsp;return images[random];
+}
+</pre>
+
+<p>The selected image is set as a background and its opacity is changed dynamically with the <span style="font-family: Courier New,Courier,monospace">animateElement()</span> method. The move of the puzzle piece is animated with the <span style="font-family: Courier New,Courier,monospace">requestAnimationFrame()</span> method.</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function setBackground()
+{
+&nbsp;&nbsp;&nbsp;backgroundEl.style.backgroundImage = &#39;url(&#39; + file + &#39;)&#39;;
+&nbsp;&nbsp;&nbsp;backgroundEl.style.display = &#39;block&#39;;
+&nbsp;&nbsp;&nbsp;backgroundEl.style.opacity = 1;
+&nbsp;&nbsp;&nbsp;animateElement(backgroundEl, &#39;opacity&#39;, 0.4, &#39;&#39;);
+&nbsp;&nbsp;&nbsp;backgroundEl.style.webkitFilter = &#39;invert(100%)&#39;;
+&nbsp;&nbsp;&nbsp;transparentEl.style.backgroundImage = &#39;url(&#39; + file + &#39;)&#39;;
+}
+
+function animateElement(el, propertyName, targetValue, unit)
+{
+&nbsp;&nbsp;&nbsp;var animationStartTime = +new Date(),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;startValue = parseFloat(el.style[propertyName], 10),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;diff = targetValue - startValue,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tick;
+
+&nbsp;&nbsp;&nbsp;el.style[propertyName] = startValue + unit;
+
+&nbsp;&nbsp;&nbsp;tick = function tick()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var /* Time passed since the start (in milliseconds) */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentAnimationTime = new Date() - animationStartTime,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Current progress (amount of animation which must be completed) */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentProgress = currentAnimationTime / ANIMATION_TIME;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (currentProgress &gt;= 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;el.style[propertyName] = targetValue + unit;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return true;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;el.style[propertyName] = (startValue + currentProgress * diff) + unit;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;requestAnimationFrame(tick);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return false;
+&nbsp;&nbsp;&nbsp;};
+
+&nbsp;&nbsp;&nbsp;tick();
+}
+</pre>
+
+<h3>Splitting the Image into Puzzle Pieces</h3>
+
+<p>The <span style="font-family: Courier New,Courier,monospace">setFree()</span> method defines which field is the empty one. During the game initialization process, the coordinates for the right bottom piece are passed to this method.</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function setFree(x, y)
+{
+&nbsp;&nbsp;&nbsp;free.x = x;
+&nbsp;&nbsp;&nbsp;free.y = y;
+}
+</pre>
+
+<p>The other fields are filled with the shuffled image pieces:</p>
+
+<pre class="prettyprint">
+/* js/main.js */
+function createPieces()
+{
+&nbsp;&nbsp;&nbsp;var i = 0, j = 0, piece, position;
+
+&nbsp;&nbsp;&nbsp;for (i; i &lt; grid.y; i += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;for (j = 0; j &lt; grid.x; j += 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (i === (grid.y - 1) &amp;&amp; j === (grid.x - 1))
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Leave the last piece empty */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;break;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece = document.createElement(&#39;div&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.className = &#39;piece match&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.x = j;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.y = i;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.startX = j;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.startY = i;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.number = i * grid.x + j;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.setAttribute(&#39;id&#39;, &#39;piece_&#39; + j + &#39;_&#39; + i);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.step = 0;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.width = (pieceWidth - 1) + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.height = (pieceHeight - 1) + &#39;px&#39;;
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position = getPosition(piece.x, piece.y);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.left = position.left + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.top = position.top + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.position = &#39;absolute&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.opacity = 1;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.backgroundImage = &#39;url(&#39; + file + &#39;)&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.backgroundPosition = &#39;-&#39; + (gameElOffset + piece.x * (pieceWidth - 1) + j + 1)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ &#39;px -&#39; + (gameElOffset + piece.y * (pieceHeight - 1) + i + 1) + &#39;px&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;document.getElementById(&#39;pieces&#39;).appendChild(piece);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<h3>Moving and Mixing Up the Puzzle Pieces</h3>
+
+<p>After the board is ready, all puzzle pieces are randomly shuffled. A random piece moves into the free field.</p>
+
+<p>When the user taps a piece, the following actions occur:</p>
+<ol>
+    <li><p>Piece position is updated to the empty field.</p></li>
+    <li><p>Step counter value is incremented.</p></li>
+    <li><p>Coordinates of the free field are updated.</p></li>
+    <li><p>Application checks whether the user wins the game. If so, the final animation is started.</p></li>
+</ol>
+<pre class="prettyprint">
+/* js/main.js */
+function shufflePieces()
+{
+&nbsp;&nbsp;&nbsp;interval = setInterval(changePiecePosition, LONG_DELAY);
+&nbsp;&nbsp;&nbsp;setTimeout(function stopChangingPiecePosition()
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;clearInterval(interval);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;interval = null;
+&nbsp;&nbsp;&nbsp;}, grid.x * grid.y * SHUFFLE_TIME);
+}
+
+function changePiecePosition(piece)
+{
+&nbsp;&nbsp;&nbsp;var x = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;y = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position = null;
+
+&nbsp;&nbsp;&nbsp;piece = piece || pickRandomNearest();
+&nbsp;&nbsp;&nbsp;x = piece.x;
+&nbsp;&nbsp;&nbsp;y = piece.y;
+&nbsp;&nbsp;&nbsp;if (!lock &amp;&amp; canMove(x, y))
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;lock = true;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.classList.toggle(&#39;match&#39;, false);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position = getPosition(free.x, free.y);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Piece goes into the free field */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.x = free.x;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.y = free.y;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animateElement(piece, &#39;left&#39;, position.left, &#39;px&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animateElement(piece, &#39;top&#39;, position.top, &#39;px&#39;);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;onChangePiecePosition(piece, x, y);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onChangePiecePosition(piece, left, top)
+{
+&nbsp;&nbsp;&nbsp;matchPosition(piece);
+&nbsp;&nbsp;&nbsp;setStepCount(piece);
+&nbsp;&nbsp;&nbsp;setFree(left, top);
+&nbsp;&nbsp;&nbsp;checkWin();
+&nbsp;&nbsp;&nbsp;lock = false;
+}
+
+function matchPosition(piece)
+{
+&nbsp;&nbsp;&nbsp;if (piece.x === piece.startX &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.y === piece.startY)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.classList.add(&#39;match&#39;);
+
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setTimeout(function animate()
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var position = getPosition(piece.x, piece.y);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Do not blink if the piece was already moved away */
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (position.left !== parseInt(piece.style.left, 10) ||
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;position.top !== parseInt(piece.style.top, 10))
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piece.style.opacity = 0;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animateElement(piece, &#39;opacity&#39;, 1, &#39;&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, ANIMATION_TIME + 50); /* Wait for the animation to end */
+&nbsp;&nbsp;&nbsp;}
+}
+
+function setStepCount(piece)
+{
+&nbsp;&nbsp;&nbsp;piece.step += 1;
+}
+
+function checkWin()
+{
+&nbsp;&nbsp;&nbsp;if (document.querySelectorAll(&#39;.piece:not(.match)&#39;).length === 0)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;finalAnimation();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;backgroundEl.style.webkitFilter = &#39;none&#39;;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;animateElement(backgroundEl, &#39;opacity&#39;, 1, &#39;&#39;);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function finalAnimation()
+{
+&nbsp;&nbsp;&nbsp;var pieces = document.getElementsByClassName(&#39;piece&#39;),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piecesLen = pieces.length;
+
+&nbsp;&nbsp;&nbsp;backgroundEl.style.display = &#39;none&#39;;
+&nbsp;&nbsp;&nbsp;transparentEl.classList.add(&#39;opaque&#39;);
+
+&nbsp;&nbsp;&nbsp;while (piecesLen)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piecesLen -= 1;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;scheduleFinalPieceAnimation(pieces[piecesLen], piecesLen * SHORT_DELAY,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;piecesLen === 0);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<h3>Managing the Battery State</h3>
+
+<p>The application uses the systeminfo module to monitor the battery state:</p>
+
+<pre class="prettyprint">
+/* js/systeminfo.js */
+init: function init()
+{
+&nbsp;&nbsp;&nbsp;&#39;use strict&#39;;
+&nbsp;&nbsp;&nbsp;if (typeof tizen === &#39;object&#39; &amp;&amp;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;typeof tizen.systeminfo === &#39;object&#39;)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.systeminfo = tizen.systeminfo;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.checkBatteryLowState();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.listenBatteryLowState();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;else
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.warn(&#39;tizen.systeminfo not available&#39;);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+
+<p>If the battery state becomes low (less than 4%) and the charger is not connected, the application is notified and it closes:</p>
+
+<pre class="prettyprint">
+/* js/systeminfo.js */
+closeApplication: function closeCurrentApplication()
+{
+&nbsp;&nbsp;&nbsp;&#39;use strict&#39;;
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.application.getCurrentApplication().exit();
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;Error: &#39;, err.message);
+&nbsp;&nbsp;&nbsp;}
+},
+
+/* Add listener for battery change to low */
+listenBatteryLowState: function listenBatteryLowState()
+{
+&nbsp;&nbsp;&nbsp;&#39;use strict&#39;;
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.systeminfo.addPropertyValueChangeListener(&#39;BATTERY&#39;, function change(battery)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (!battery.isCharging)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.closeApplication();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{lowThreshold: 0.04},
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;function onError(err)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;Error: &#39;, err.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;});
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;Error: &#39;, err.message);
+&nbsp;&nbsp;&nbsp;}
+},
+
+/* Check low battery state */
+checkBatteryLowState: function checkBatteryLowState()
+{
+&nbsp;&nbsp;&nbsp;&#39;use strict&#39;;
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.systeminfo.getPropertyValue(&#39;BATTERY&#39;, function onGetBatteryInfo(battery)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (battery.level &lt; 0.04 &amp;&amp; !battery.isCharging)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;this.closeApplication();
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}, null);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (err)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;Error: &#39;, err.message);
+&nbsp;&nbsp;&nbsp;}
+},
+</pre>
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
diff --git a/org.tizen.sampledescriptions/html/wearable_w/soundmanager_ww.htm b/org.tizen.sampledescriptions/html/wearable_w/soundmanager_ww.htm
new file mode 100644 (file)
index 0000000..1ec4805
--- /dev/null
@@ -0,0 +1,464 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=9" />
+    <link rel="stylesheet" type="text/css" href="../css/styles.css" />
+    <link rel="stylesheet" type="text/css" href="../css/snippet.css" />
+    <script type="text/javascript" src="../scripts/snippet.js"></script>
+    <script type="text/javascript" src="../scripts/jquery.util.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/common.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/core.js" charset="utf-8"></script>
+    <script type="text/javascript" src="../scripts/search.js" charset="utf-8"></script>
+    <title>Sound Manager Sample Overview</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+
+<div id="toc-navigation">
+    <div id="profile">
+        <p><img alt="Wearable Web" src="../images/wearable_s_w.png"/></p>
+    </div>
+    <div id="toc_border"><div id="toc">
+        <p class="toc-title">Related Info</p>
+        <ul class="toc">
+            <li><a href="../../../org.tizen.guides/html/web/tizen/multimedia/sound_w.htm">Sound Guide</a></li>
+            <li><a href="../../../org.tizen.web.apireference/html/device_api/wearable/tizen/sound.html">Sound API</a></li>
+        </ul>
+    </div></div>
+</div>
+
+<div id="container"><div id="contents"><div class="content">
+
+<h1>Sound Manager Sample Overview</h1>
+
+<p>The Sound Manager sample application demonstrates how you can manage custom sound profiles. A sound profile is a structure consisting of a unique name and a list of volume values for all available sound types, such as ringtone, notification, and alarm.</p>
+<p>For information on creating the sample application project in the IDE, see <a href="../cover_page.htm#create">Creating Sample Applications</a>.</p>
+<p>The following figure illustrates the main screens of the Sound Manager.</p>
+<p class="figure">Figure: Sound Manager screens</p>
+<p align="center"><img alt="Sound Manager screens" src="../images/soundmanager_screen_1_ww.png" /> <img alt="Sound Manager screens" src="../images/soundmanager_screen_2_ww.png" /></p>
+<p>The application opens with the main screen, which shows a list of all sound profiles created by the user:</p>
+
+<ul><li>To activate a sound profile, select the radio button next to the profile name.
+<p>When a profile is activated, the system sound settings are set to its values.</p></li>
+<li>To add a new profile, click <strong>Add</strong> and enters a name for the new profile.
+<p>The new profile is initialized with the current system sound settings.</p></li>
+<li>To modify the values of a sound profile, click the profile name.
+<p>The details screen opens, showing the various sound type volumes set for that profile. Use the range inputs to change the volume values.</p>
+<p>If the currently active profile is modified, the changes are applied directly to the system settings.</p>
+<p>To restore the profile values to the state they were in when the details screen was opened, click <strong>Reset</strong>. To delete the profile, click <strong>Delete</strong>.</p></li></ul>
+
+<h2>Prerequisites</h2>
+<p>To ensure proper application execution, the following privilege must be set:</p>
+<ul>
+  <li><span style="font-family: Courier New,Courier,monospace">http://tizen.org/privilege/volume.set</span></li>
+</ul>
+
+<h2>Source Files</h2>
+
+<p>You can create and view the sample application project including the source files in the IDE.</p>
+
+<p>The application uses a simple Model View (MV) architecture. The core part determines the architecture, and the application part determines the application behavior. The <span style="font-family: Courier New,Courier,monospace">core.js</span> file implements a simple Asynchronous Module Definition (AMD) and specifies how modules are defined.</p>
+
+<table border="1">
+    <tbody>
+        <tr>
+            <th>File name</th>
+            <th>Description</th>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">config.xml</span></td>
+            <td>This file contains the application information for the platform to install and launch the application, including the view mode and the icon to be used in the device menu.</td>
+        </tr>
+               <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">css/</span></td>
+            <td>This directory contains the CSS (Cascading Style Sheets) files used in the application.</td>
+        </tr>          
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">css/style.css</span></td>
+            <td>This file contains the CSS styling for the application UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">index.html</span></td>
+            <td>This is a starting file from which the application starts loading. It contains the layout of the application screens.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/</span></td>
+            <td>This directory contains the application code.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/core/</span></td>
+            <td>This directory contains the application framework.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/helpers/ui.js</span></td>
+            <td>This file contains the UI helper methods.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/models/</span></td>
+            <td>This directory contains the application model modules.</td>
+        </tr>          
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/models/soundProfiles.js</span></td>
+            <td>This file contains the methods related to sound profile data.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/</span></td>
+            <td>This directory contains the files implementing the application views.</td>
+        </tr>          
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/details.js</span></td>
+            <td>This file contains the methods related to the details screen UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">js/views/main.js</span></td>
+            <td>This file contains the methods related to the profiles screen UI.</td>
+        </tr>
+        <tr>
+            <td><span style="font-family: Courier New,Courier,monospace">templates/</span></td>
+            <td>This directory contains the templates for list items.</td>
+        </tr>
+    </tbody>
+</table>
+
+
+<h2>Implementation</h2>
+
+<h3>Defining the Application Layout</h3>
+
+<p>The application has 2 screens defined in the <span style="font-family: Courier New,Courier,monospace">index.html</span> file:</p>
+
+<ul><li>Main screen displays a list of sound profiles.
+
+<p>The screen layout consists of a header, a list of profiles, and a footer with the <strong>Add</strong> button:</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page ui-page-active&quot; id=&quot;main&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;Sound Manager&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot; id=&quot;profiles&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;footer class=&quot;ui-footer&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;addProfileButton&quot; class=&quot;ui-btn ui-btn-footer-icon btn-add&quot;&gt;Add&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;/footer&gt;
+&lt;/div&gt;
+</pre>
+
+<p>The profile list rows are generated from the <span style="font-family: Courier New,Courier,monospace">templates/listItem.tpl</span> template file. The template uses as parameters the profile ID and name, and a Boolean flag indicating whether the profile is active.</p>
+
+<pre class="prettyprint">
+&lt;!--templates/listItem.tpl--&gt;
+&lt;li class=&quot;li-has-radio&quot; data-profile-id=&quot;{{id}}&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;label&gt;{{title}}&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;input data-profile-id=&quot;{{id}}&quot; type=&quot;radio&quot; name=&quot;profile-item&quot;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{{?isActive}}checked=&quot;checked&quot;{{/isActive}}/&gt;
+&lt;/li&gt;
+</pre>
+</li>
+
+<li>Details screen displays the volumes of all sound types for the selected sound profile.
+
+<p>The screen layout consists of a header with the profile title, a list of sound types, and a footer with the <strong>Reset</strong> and <strong>Delete</strong> buttons:</p>
+
+<pre class="prettyprint">
+&lt;!--index.html--&gt;
+&lt;div class=&quot;ui-page&quot; id=&quot;details&quot;&gt;
+&nbsp;&nbsp;&nbsp;&lt;header class=&quot;ui-header&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;h2 class=&quot;ui-title&quot;&gt;&lt;/h2&gt;
+&nbsp;&nbsp;&nbsp;&lt;/header&gt;
+&nbsp;&nbsp;&nbsp;&lt;div class=&quot;ui-content&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;ul class=&quot;ui-listview&quot; id=&quot;soundTypes&quot;&gt;&lt;/ul&gt;
+&nbsp;&nbsp;&nbsp;&lt;/div&gt;
+&nbsp;&nbsp;&nbsp;&lt;footer class=&quot;ui-footer ui-grid-col-2&quot;&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;reset&quot; class=&quot;ui-btn ui-btn-footer-icon btn-reset&quot;&gt;Reset&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&lt;a id=&quot;delete&quot; class=&quot;ui-btn ui-btn-footer-icon btn-trash&quot;&gt;Delete&lt;/a&gt;
+&nbsp;&nbsp;&nbsp;&lt;/footer&gt;
+&lt;/div&gt;
+</pre>
+
+<p>The sound type list rows are generated from the <span style="font-family: Courier New,Courier,monospace">templates/soundTypeItem.tpl</span> template file, which uses the sound type name as a parameter:</p>
+
+<pre class="prettyprint">
+&lt;!--templates/soundTypeItem.tpl--&gt;
+&lt;li&gt;
+&nbsp;&nbsp;&nbsp;&lt;label for=&quot;{{name}}&quot;&gt;{{name}}&lt;span&gt;&lt;/span&gt;&lt;/label&gt;
+&nbsp;&nbsp;&nbsp;&lt;input id=&quot;{{name}}&quot; type=&quot;range&quot; min=&quot;0&quot; max=&quot;10&quot;&gt;
+&lt;/li&gt;
+</pre>
+</li></ul>
+
+<h3>Initializing the Application</h3>
+
+<p>To initialize the application:</p>
+<ol>
+<li><p>Define variables for holding the values of the currently active profile, and all the user&#39;s sound profiles:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+var currentProfile = {},
+&nbsp;&nbsp;&nbsp;&nbsp;profiles = [],
+</pre></li>
+
+<li><p>Define an array that holds the IDs of all sound types, and a variable for the active profile ID (<span style="font-family: Courier New,Courier,monospace">null</span>, if no profile is activated):</p>
+<pre class="prettyprint">
+&nbsp;&nbsp;&nbsp;&nbsp;SOUND_TYPES = 
+&nbsp;&nbsp;&nbsp;&nbsp;[
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;SYSTEM&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;NOTIFICATION&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;ALARM&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;MEDIA&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;VOICE&#39;,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&#39;RINGTONE&#39;
+&nbsp;&nbsp;&nbsp;&nbsp;]
+&nbsp;&nbsp;&nbsp;&nbsp;activeProfileId = null;
+</pre>
+</li>
+<li><p>Fill the <span style="font-family: Courier New,Courier,monospace">currentProfile</span> object with the current values. You can obtain the system values of all sound types using the <span style="font-family: Courier New,Courier,monospace">getVolume()</span> method:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function init() 
+{
+&nbsp;&nbsp;&nbsp;var i = 0, soundType = null;
+
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; SOUND_TYPES.length; i += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundType = SOUND_TYPES[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentProfile[soundType] = tizen.sound.getVolume(soundType);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;catch (e)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(e.message);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+</pre></li>
+
+
+<li><p>Register a volume change listener and define a callback to monitor and react to volume changes outside the application.</p>
+
+<p>If the volume is changed from outside the application, the application must save the new volume value to the <span style="font-family: Courier New,Courier,monospace">currentProfile</span> object and deactivate the active profile, if any, by setting the <span style="font-family: Courier New,Courier,monospace">activeProfileId</span> variable to <span style="font-family: Courier New,Courier,monospace">null</span>.</p>
+
+<pre class="prettyprint">
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.sound.setVolumeChangeListener(onVolumeChanged);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(e.message);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function onVolumeChanged(soundType, volume)
+{
+&nbsp;&nbsp;&nbsp;if (currentProfile[soundType] !== volume)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentProfile[soundType] = volume;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (activeProfileId !== null)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activeProfileId = null;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;event.fire(&#39;changed&#39;);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+</li>
+</ol>
+
+<p>The sound profile is represented by an object with the following fields:</p>
+<ul><li><span style="font-family: Courier New,Courier,monospace">id</span>: Unique identifier of the profile</li>
+<li><span style="font-family: Courier New,Courier,monospace">title</span>: Profile title</li>
+<li><span style="font-family: Courier New,Courier,monospace">XXX</span> – Value of the XXX sound type, where XXX is one of the <span style="font-family: Courier New,Courier,monospace">SOUND_TYPES</span> array values</li></ul>
+
+<p>For example:</p>
+<pre class="prettyprint">
+{
+&nbsp;&nbsp;&nbsp;id: 1313,
+&nbsp;&nbsp;&nbsp;title: &#39;Custom Profile&#39;,
+&nbsp;&nbsp;&nbsp;SYSTEM: 0.1,
+&nbsp;&nbsp;&nbsp;NOTIFICATION: 0.2,
+&nbsp;&nbsp;&nbsp;ALARM: 0.3,
+&nbsp;&nbsp;&nbsp;MEDIA: 0.5,
+&nbsp;&nbsp;&nbsp;VOICE: 0,
+&nbsp;&nbsp;&nbsp;RINGTONE: 1
+}
+</pre>
+
+<h3>Adding a New Sound Profile</h3>
+
+<p>A new sound profile is added with the current system values when the user clicks <strong>Add</strong> and enters the profile name.</p>
+<p>The new profile is a copy of the <span style="font-family: Courier New,Courier,monospace">currentProfile</span> object with 2 additional fields:</p>
+<ul>
+<li><p><span style="font-family: Courier New,Courier,monospace">title</span>: Profile name</p></li>
+<li><p><span style="font-family: Courier New,Courier,monospace">id</span>: Profile ID</p></li>
+</ul>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function createProfile(title)
+{
+&nbsp;&nbsp;&nbsp;var currentProfileCopy = JSON.parse(JSON.stringify(currentProfile)),
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;id = profiles.length ? profiles[profiles.length - 1].id + 1 : 0;
+&nbsp;&nbsp;&nbsp;currentProfileCopy.title = title;
+&nbsp;&nbsp;&nbsp;currentProfileCopy.id = id;
+&nbsp;&nbsp;&nbsp;profiles.push(currentProfileCopy);
+&nbsp;&nbsp;&nbsp;/* Save the profiles array to local storage */
+}
+</pre>
+
+<h3>Setting the Changed Volume</h3>
+
+<p>The application sets the volume of the specified sound type when:</p>
+
+<ul><li>The selected profile is activated:
+<p>To activate a profile, the user clicks the radio button of the profile on the main screen. The application reads the profile values and updates system sound settings with these values.</p>
+<ol>
+<li><p>To retrieve a profile with the specified ID, use the <span style="font-family: Courier New,Courier,monospace">getProfile()</span> method:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function getProfile(id)
+{
+&nbsp;&nbsp;&nbsp;var i = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;profile = null;
+
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; profiles.length; i += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;profile = profiles[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (profile.id === id)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return profile;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;return null;
+}
+</pre></li>
+<li><p>In the <span style="font-family: Courier New,Courier,monospace">changeSystemSoundVolume()</span> method, set the specified volume value to the specified sound type using the <span style="font-family: Courier New,Courier,monospace">setVolume()</span> method:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function changeSystemSoundVolume(soundType, volume)
+{
+&nbsp;&nbsp;&nbsp;try
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;currentProfile[soundType] = volume;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tizen.sound.setVolume(soundType, volume);
+&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;catch (e)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;console.error(&#39;Setting &#39; + soundType + &#39; error: &#39; + e.message);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+<li><p>To fill the system sound settings with the volume values from the specified profile, use the <span style="font-family: Courier New,Courier,monospace">changeSystemProfile()</span> method:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function changeSystemProfile(profile)
+{
+&nbsp;&nbsp;&nbsp;var i = 0,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundType = null;
+
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; SOUND_TYPES.length; i += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soundType = SOUND_TYPES[i];
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changeSystemSoundVolume(soundType, profile[soundType]);
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+<li><p>To activate the profile with the specified ID, use the <span style="font-family: Courier New,Courier,monospace">setActive()</span> method:</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function setActive(id)
+{
+&nbsp;&nbsp;&nbsp;if (activeProfileId !== id)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changeSystemProfile(getProfile(id));
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;activeProfileId = id;
+&nbsp;&nbsp;&nbsp;}
+}
+</pre></li>
+</ol>
+
+
+</li>
+<li>The sound type value of the active profile changes:
+
+<p>If the user opens the active profile in the details screens and modifies its values, the change is applied to the system settings immediately. The <span style="font-family: Courier New,Courier,monospace">updateProfile()</span> method updates the specified sound type in the specified profile, provided it is the active profile. The method gets as parameters the ID of the profile, the name of the sound type, and the new value.</p>
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function updateProfile(profileId, soundType, volume)
+{
+&nbsp;&nbsp;&nbsp;var profile = getProfile(profileId);
+
+&nbsp;&nbsp;&nbsp;if (profile)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;profile[soundType] = volume;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (profile.id === activeProfileId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;changeSystemSoundVolume(soundType, volume);
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+}
+</pre>
+</li>
+</ul>
+
+
+
+<h3>Deleting a Sound Profile</h3>
+
+<p>To delete the profile with the specified ID:</p>
+
+<pre class="prettyprint">
+/* js/models/soundProfile.js */
+function deleteProfile(id)
+{
+&nbsp;&nbsp;&nbsp;var index = getProfileIndex(id);
+&nbsp;&nbsp;&nbsp;if (index !== -1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;profiles.splice(index, 1);
+&nbsp;&nbsp;&nbsp;}
+}
+
+function getProfileIndex(profileId)
+{
+&nbsp;&nbsp;&nbsp;var i = 0;
+
+&nbsp;&nbsp;&nbsp;for (i = 0; i &lt; profiles.length; i += 1)
+&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (profiles[i].id === profileId)
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;return i;
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}
+&nbsp;&nbsp;&nbsp;}
+
+&nbsp;&nbsp;&nbsp;return -1;
+}
+</pre>
+
+
+<script type="text/javascript" src="../scripts/jquery.zclip.min.js"></script>
+<script type="text/javascript" src="../scripts/showhide.js"></script>
+
+</div></div></div>
+
+<a class="top sms" href="#"><img src="../images/btn_top.gif" alt="Go to top" /></a>
+
+<div id="footer">
+<p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+</div>
+
+<script type="text/javascript">
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-25976949-1']);
+_gaq.push(['_trackPageview']);
+(function() {
+var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+})();
+</script>
+
+</body>
+</html>
\ No newline at end of file
index 6486a29..4085ba4 100644 (file)
                        <topic href="html/mobile_w/eventmanager_mw.htm" label="EventManager"></topic>
                        <topic href="html/mobile_w/exerciseplanner_mw.htm" label="ExcercisePlanner"></topic>
                        <topic href="html/mobile_w/filemanager_mw.htm" label="FileManager"></topic>
+                       <topic href="html/mobile_w/flashlight_mw.htm" label="Flashlight"></topic>
                        <topic href="html/mobile_w/fmradio_mw.htm" label="FMRadio"></topic>
                        <topic href="html/mobile_w/hellotizen_mw.htm" label="HelloTizen"></topic>
+                       <topic href="html/mobile_w/jpegexifeditor_mw.htm" label="JPEGExifEditor"></topic>
                        <topic href="html/mobile_w/mediacontent_mw.htm" label="MediaContent"></topic>
+                       <topic href="html/mobile_w/memo_mw.htm" label="Memo"></topic>
+                       <topic href="html/mobile_w/mirror_mw.htm" label="Mirror"></topic>
                        <topic href="html/mobile_w/moneybook_mw.htm" label="MoneyBook"></topic>
+                       <topic href="html/mobile_w/morse_code_flashlight_mw.htm" label="Morse Code Flashlight"></topic>
                        <topic href="html/mobile_w/multiprocess_hybrid_package_mw.htm" label="Multi-project Hybrid Application">
                                <topic href="html/mobile_w/hybridwebapp_mw.htm" label="HybridWebApp"></topic>
                        </topic>
+                       <topic href="html/mobile_w/pagenavigation_mw.htm" label="PageNavigation"></topic>
                        <topic href="html/mobile_w/piano_mw.htm" label="Piano"></topic>
+                       <topic href="html/mobile_w/screenorientation_mw.htm" label="ScreenOrientation"></topic>
                        <topic href="html/mobile_w/selfcamera_mw.htm" label="SelfCamera"></topic>
                        <topic href="html/mobile_w/sensorball_mw.htm" label="SensorBall"></topic>
+                       <topic href="html/mobile_w/shapeeditor_mw.htm" label="ShapeEditor"></topic>
                        <topic href="html/mobile_w/soundmanager_mw.htm" label="SoundManager"></topic>
+                       <topic href="html/mobile_w/spiritlevel_mw.htm" label="SpiritLevel"></topic>
                        <topic href="html/mobile_w/systeminfo_mw.htm" label="Systeminfo"></topic>
+                       <topic href="html/mobile_w/systemsettings_mw.htm" label="SystemSettings"></topic>
                        <topic href="html/mobile_w/touchpaint_mw.htm" label="TouchPaint"></topic>
                        <topic href="html/mobile_w/uicomponent_mw.htm" label="UIComponent"></topic>
-
+                       <topic href="html/mobile_w/wifi_info_mw.htm" label="WiFi Info"></topic>
                </topic>
                <topic href="html/wearable_w/sd_ww.htm" label="Wearable Web">
                        <topic href="html/wearable_w/altimeter_ww.htm" label="Altimeter"></topic>
                        <topic href="html/wearable_w/analogwatch_ww.htm" label="AnalogWatch"></topic>
+                       <topic href="html/wearable_w/appmanager_ww.htm" label="App Manager"></topic>
                        <topic href="html/wearable_w/appcalleecaller_ww.htm" label="AppCaller and AppCallee"></topic>
                        <topic href="html/wearable_w/basicwatch_ww.htm" label="BasicWatch"></topic>
                        <topic href="html/wearable_w/calculator_ww.htm" label="Calculator"></topic>
                        <topic href="html/wearable_w/camera_ww.htm" label="Camera"></topic>
                        <topic href="html/wearable_w/compass_ww.htm" label="Compass"></topic>
                        <topic href="html/wearable_w/digitalwatch_ww.htm" label="DigitalWatch"></topic>
+                       <topic href="html/wearable_w/heartratemonitor_ww.htm" label="HeartRateMonitor"></topic>
                        <topic href="html/wearable_w/hellotizen_ww.htm" label="HelloTizen"></topic>
                        <topic href="html/wearable_w/minigallery_ww.htm" label="MiniGallery"></topic>
                        <topic href="html/wearable_w/moneybook_ww.htm" label="MoneyBook"></topic>
                        <topic href="html/wearable_w/newsfeed_ww.htm" label="NewsFeed"></topic>
+                       <topic href="html/wearable_w/puzzle_ww.htm" label="Puzzle"></topic>
                        <topic href="html/wearable_w/sensorball_ww.htm" label="SensorBall"></topic>
+                       <topic href="html/wearable_w/soundmanager_ww.htm" label="Sound Manager"></topic>
                        <topic href="html/wearable_w/spinning_arrow_ww.htm" label="SpinningArrow"></topic>
                        <topic href="html/wearable_w/stopwatch_ww.htm" label="StopWatch"></topic>
                        <topic href="html/wearable_w/sunburnmonitor_ww.htm" label="SunburnMonitor"></topic>
@@ -60,6 +74,7 @@
        </topic>
        <topic href="html/sd_n.htm" label="Native Application">
                <topic href="html/mobile_n/sd_mn.htm" label="Mobile Native">
+                       <topic href="html/mobile_n/appcommon_sd_mn.htm" label="Application Common"></topic>
                        <topic href="html/mobile_n/application_control_sd_mn.htm" label="Application Control"></topic>
                        <topic href="html/mobile_n/bluetoothchat_sd_mn.htm" label="Bluetooth Chat"></topic>
                        <topic href="html/mobile_n/bundle_sd_mn.htm" label="Bundle"></topic>
                        <topic href="html/mobile_n/cairo_evasgl_sd_mn.htm" label="Cairo EvasGL"></topic>
                        <topic href="html/mobile_n/calculator_sd_mn.htm" label="Calculator"></topic>
                        <topic href="html/mobile_n/contacts_sd_mn.htm" label="Contacts"></topic>
-                       <topic href="html/mobile_n/efl_core_samples_sd_mn.htm" label="EFL Core Samples"></topic>
+                       <topic href="html/mobile_n/context_history_sd_mn.htm" label="Context History"></topic>
+                       <topic href="html/mobile_n/context_trigger_sd_mn.htm" label="Context Trigger"></topic>
+                       <topic href="html/mobile_n/efl_core_samples_sd_mn.htm" label="EFL Core"></topic>
                        <topic href="html/mobile_n/evas_gl_sd_mn.htm" label="EvasGLCube"></topic>
+                       <topic href="html/mobile_n/event_sd_mn.htm" label="Event"></topic>
                        <topic href="html/mobile_n/file_manager_sd_mn.htm" label="File Manager"></topic>
                        <topic href="html/mobile_n/glview11_cube_sd_mn.htm" label="GLView11Cube"></topic>
                        <topic href="html/mobile_n/glview_cube_sd_mn.htm" label="GLViewCube"></topic>
                        <topic href="html/mobile_n/gps_consumer_sd_mn.htm" label="GPS Consumer"></topic>
                        <topic href="html/mobile_n/gps_service_sd_mn.htm" label="GPS Service"></topic>
                        <topic href="html/mobile_n/hybridservice_sd_mn.htm" label="HybridServiceApp"></topic>
+                       <topic href="html/mobile_n/internationalization_sd_mn.htm" label="Internationalization"></topic>
+                       <topic href="html/mobile_n/lbs_geofence_sd_mn.htm" label="LBS Geofence"></topic>
+                       <topic href="html/mobile_n/lbs_maps_sd_mn.htm" label="LBS Maps"></topic>
+                       <topic href="html/mobile_n/oauth_sd_mn.htm" label="LibOauth"></topic>
                        <topic href="html/mobile_n/lockscreen_sd_mn.htm" label="Lockscreen"></topic>
                        <topic href="html/mobile_n/mediaapp_sd_mn.htm" label="Media App"></topic>
                        <topic href="html/mobile_n/mediacontroller_client_sd_mn.htm" label="Media-controller-client"></topic>
                        <topic href="html/mobile_n/mediacontroller_server_sd_mn.htm" label="Media-controller-server"></topic>
                        <topic href="html/mobile_n/messageport_sd_mn.htm" label="Message Port"></topic>
+                       <topic href="html/mobile_n/metadata_editor_sd_mn.htm" label="Metadata Editor"></topic>
                        <topic href="html/mobile_n/notificationmanager_sd_mn.htm" label="Notification Manager"></topic>
+                       <topic href="html/mobile_n/oauth2_sd_mn.htm" label="Oauth2"></topic>
                        <topic href="html/mobile_n/paint_sd_mn.htm" label="Paint"></topic>
                        <topic href="html/mobile_n/pedometer_sd_mn.htm" label="Pedometer"></topic>
                        <topic href="html/mobile_n/piano_sd_mn.htm" label="Piano"></topic>
                        <topic href="html/mobile_n/preference_sd_mn.htm" label="Preference"></topic>
                        <topic href="html/mobile_n/puzzle_sd_mn.htm" label="Puzzle"></topic>
+                       <topic href="html/mobile_n/resource_manager_sd_mn.htm" label="Resource Manager"></topic>
+                       <topic href="html/mobile_n/sample_account_sd_mn.htm" label="Sample Account"></topic>
                        <topic href="html/mobile_n/scheduler_sd_mn.htm" label="Scheduler"></topic>
                        <topic href="html/mobile_n/scroller_index_sd_mn.htm" label="Scroller Index"></topic>
                        <topic href="html/mobile_n/selfcamera_sd_mn.htm" label="SelfCamera"></topic>
                        <topic href="html/mobile_n/sensorapp_sd_mn.htm" label="SensorApp"></topic>
+                       <topic href="html/mobile_n/service_adaptor_sd_mn.htm" label="Service Adaptor"></topic>
                        <topic href="html/mobile_n/simple_home_sd_mn.htm" label="Simple Homescreen"></topic>
                        <topic href="html/mobile_n/sketch_sd_mn.htm" label="Sketch"></topic>
                        <topic href="html/mobile_n/stopwatch_sd_mn.htm" label="Stopwatch"></topic>
                        <topic href="html/mobile_n/syncadapterserviceapp_sd_mn.htm" label="Sync Adapter Service App"></topic>
                        <topic href="html/mobile_n/systeminfo_sd_mn.htm" label="System Info"></topic>
                        <topic href="html/mobile_n/taskmanager_sd_mn.htm" label="Taskmanager"></topic>
+                       <topic href="html/mobile_n/thumbnail_util_sd_mn.htm" label="Thumbnail Util"></topic>
+                       <topic href="html/mobile_n/tts_sd_mn.htm" label="TTS"></topic>
                        <topic href="html/mobile_n/ui_components_sd_mn.htm" label="UI Components"></topic>
+                       <topic href="html/mobile_n/voice_control_sd_mn.htm" label="Voice Control"></topic>
+                       <topic href="html/mobile_n/voice_control_elm_sd_mn.htm" label="Voice Control for EFL Components"></topic>
                        <topic href="html/mobile_n/volume_sd_mn.htm" label="Volume"></topic>
                        <topic href="html/mobile_n/ui_app_store_sd_mn.htm" label="[UI Sample] ApplicationStore"></topic>
                        <topic href="html/mobile_n/ui_calculator_sd_mn.htm" label="[UI Sample] Calculator"></topic>
                        <topic href="html/wearable_n/cairo_basic_sd_wn.htm" label="(Circle) Cairo Basic"></topic>
                        <topic href="html/wearable_n/cairo_evasgl_sd_wn.htm" label="(Circle) Cairo EvasGL"></topic>                     
                        <topic href="html/wearable_n/circleemail_sd_wn.htm" label="(Circle) Email"></topic>
-                       <topic href="html/wearable_n/circlerotarytimer_sd_wn.htm" label="(Circle) Rotary Timer"></topic>                        
+                       <topic href="html/wearable_n/circlerotarytimer_sd_wn.htm" label="(Circle) Rotary Timer"></topic>
+                       <topic href="html/wearable_n/circlesensors_sd_wn.htm" label="(Circle) Sensors"></topic>
                        <topic href="html/wearable_n/circlesettingtime_sd_wn.htm" label="(Circle) Setting Time"></topic>
                        <topic href="html/wearable_n/circlesettings_sd_wn.htm" label="(Circle) Settings"></topic>
                        <topic href="html/wearable_n/rectemail_sd_wn.htm" label="(Rectangle) Email"></topic>
                        <topic href="html/wearable_n/rectnotificationmanager_sd_wn.htm" label="(Rectangle) NotificationManager"></topic>
                        <topic href="html/wearable_n/rectsettings_sd_wn.htm" label="(Rectangle) Settings"></topic>
                        <topic href="html/wearable_n/rectuidialer_sd_wn.htm" label="(Rectangle) UI Dialer"></topic>
+                       <topic href="html/wearable_n/rectwidgetviewer_sd_wn.htm" label="(Rectangle) Widget Viewer"></topic>
                        <topic href="html/wearable_n/analog_watch_sd_wn.htm" label="Analog Watch"></topic>
                        <topic href="html/wearable_n/digital_watch_sd_wn.htm" label="Digital-Watch"></topic>
                        <topic href="html/wearable_n/evas_gl_sd_wn.htm" label="EvasGLCube"></topic>