Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Smart TV
docnacl toolchain importantdue to nacl deprecation by the chromium project, tizen tv will continue its support for nacl only until 2021-year products meanwhile, tizen tv will start focusing on high-performance, cross-browser webassembly from 2020-year products the native client technology allows to run native c/c++ applications inside a web browser tizen web applications can take full advantage of the increased performance of native code over javascript nacl sdk pepper toolchain 63 newmay 22, 2018 pepper toolchain 1 68gb pepper toolchain 56apr 10, 2018 pepper toolchain 2 06gb pepper toolchain 47apr 04, 2017 pepper toolchain 2 02gb pepper toolchain 42apr 08, 2016 pepper toolchain 1 12gb pepper toolchain 37dec 03, 2015 pepper toolchain 974 03mb pepper toolchain 31feb 26, 2016 pepper toolchain 1,297mb pepper 63 new & changed features low-latency mode in nacl player api low-latency mode in video decoder api bug fixes samsung specific fixes various bug fixes and performance improvements known issues n/a pepper 56 new & changed features samsung specific changes tizen file system interface added bug fixes samsung specific fixes fixed memory leaks in nacl player chromium specific fixes fixed dynamic library loadin with glibc known issues n/a pepper 47 new & changed features samsung specific changes nacl player interfaces updated support for h265 codec in nacl player added loading shared libraries with nacl glibc toolchain enabled update of program tv specific interfaces chromium specific changes upgraded llvm to version 3 6 since pepper 43 the c11/c++11 acquire, release and acq_rel memory orders are now generated by default since pepper 43 bug fixes samsung specific fixes fixed an error nacl_io does not propagate socket errors properly chromium specific fixes fixed a code generation bug on arm when dealing with 16-bit load/store and bswap which led to a nacl validation failure since pepper 43 known issues n/a pepper 42 new & changed features samsung specific changes support in nacl_io for multicasting using samsung specific pepper api added nacl player interfaces removed gesture recognition interface update of program tv specific interfaces chromium specific changes added compositor interfaces since pepper 37 compilation speed improvements due to validation caching of the translator and linker since pepper 38 performance improvement of simd vector shuffle since pepper 38 postmessageandawaitresponse is now stable and allows javascript to communicate synchronously with nacl embeds since pepper 39 pnacl is now based on llvm 3 5 since pepper 41 the x86 nacl validators accept instructions from the avx1 extensions since pepper 41 the x86 nacl validators accept instructions from the fma3 extensions, as well as avx2 instructions except vgather the sdk now contains experimental versions of i686-nacl-clang, x86_64-nacl-clang, and arm-nacl-clang as well as the clang++ equivalents these toolchains are based on the same llvm version as pnacl, but can be used to generate nacl nexe files instead of translating a pexe locally or using the gcc toolchain bug fixes n/a known issues n/a technical document pepper_42 api reference pepper 37 new & changed features samsung specific changes added program tv specific interfaces added udp multicast support extension interface added removable storage interfaces added gesture recognition interface chromium specific changes the nacl_io library now includes a fuse mount since pepper 33 translation now uses dynamic load balancing, making translation time faster since pepper 35 upgraded llvm to version 3 4 since pepper 35 bug fixes n/a known issues n/a technical document pepper_37 api reference pepper 31 new & changed features chromium specific changes improved socket support in the nacl_io library bug fixes n/a known issues n/a technical document pepepr_31 api reference
Develop Smart TV
apivoiceinteraction api to use samsung product api, <script type="text/javascript" src="$webapis/webapis/webapis js"></script> should be loaded in index html samsung tvs allow developers to use voice commands such as navigation, search, selection and media control to control their application the voice assistant in the tv can be bixby or other assistants regardless of which assistant is used, the application will interact with it via the voice interaction apis for best results, we recommend the application to be implemented with all the features that are described in this document since 6 0 product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol summary of interfaces and methods interface method voiceinteractionmanagerobject voiceinteractioncallback optional voiceapplicationstate onupdatestate ;optional boolean onnavigation voicenavigation voicenavigation ;optional boolean onsearch voicesearchterm voicesearchterm ;optional boolean onplay ;optional boolean onstop ;optional boolean onpause ;optional boolean onexit ;optional boolean onselection long voiceselection ;optional boolean ontitleselection domstring title ;optional boolean onfastforward ;optional boolean onrewind ;optional domstring onsearchcollection voicesearchterm voicesearchterm ;optional boolean onchangeappstate voiceapplicationstate state ;optional boolean onchangeprevioustrack ;optional boolean onchangenexttrack ;optional boolean onrestart ;optional boolean onskipbackward long offsetseconds ;optional boolean onskipforward long offsetseconds ;optional boolean onsetplayposition long position ;optional boolean onchangesubtitlemode mediafunctionmode mode ;optional boolean onchangeshufflemode mediafunctionmode mode ;optional boolean onchangescreenfitmode mediafunctionmode mode ;optional boolean onzoom mediazoommode zoom ;optional boolean onrotate mediarotatemode direction ;optional boolean onchange360mode mediafunctionmode mode ;optional boolean onchangerepeatmode mediarepeatmode mode ;optional boolean oncontinuewatching ;optional boolean oncustom domstring jsonobjectstring ;optional domstring onrequestcontentcontext ;optional boolean onadditiontolist listitem list ;optional boolean onremovalfromlist listitem list ;optional boolean onplaylist listitem list ;optional boolean onbrowselist listitem list ;optional boolean onskipad ; voicesearchterm voiceinteractioncontentcontext voiceinteractionmanager domstring getversion ;void setcallback voiceinteractioncallback callback ;void listen ;domstring getdatafromsearchterm voicesearchterm voicesearchterm, voicesearchtermfield field ;domstring buildcollectiondeeplinkdata domstring appid, domstring title, domstring payload ;domstring buildcollectionshowdata domstring appid, domstring title, domstring payload, domstring thumbnail ;voiceinteractioncontentcontext buildvoiceinteractioncontentcontextitem long positionx, long positiony, domstring title, domstring[] aliasarr, boolean bfocused ;domstring buildvoiceinteractioncontentcontextresponse voiceinteractioncontentcontext[] contentcontextarr ; 1 type definitions 1 1 voiceapplicationstate the application status handled via voice interaction enum voiceapplicationstate { "none", "home", "list", "player", "setting", "search", "unknown" }; the following values are supported none application default status home the status of application's home list the status of application showing something in list player the status of application playing something setting the status of application showing its setting search the status of application searching its content unknown the status of unknown 1 2 voicenavigation the navigation via voice interaction enum voicenavigation { "nav_previous", "nav_next", "nav_left", "nav_right", "nav_up", "nav_down", "nav_show_more", "nav_unknown" }; the following values are supported nav_previous the navigation for the previous page nav_next the navigation for the next page nav_left the navigation for the left item nav_right the navigation for the right item nav_up the navigation for the upper item nav_down the navigation for the down item nav_show_more the navigation for the detail page nav_unknown the navigation for unknown 1 3 voicesearchtermfield defines the fields which can be delivered via voice search enum voicesearchtermfield { "search_term_utterance", "search_term_title", "search_term_genre", "search_term_cast", "search_term_content_type", "search_term_release_date_from", "search_term_release_date_to" }; the following values are supported search_term_utterance the field for the full utterance search_term_title the field for the title search_term_genre the field for the genre search_term_cast the field for the cast search_term_content_type the field for the content type movie/tvshow search_term_release_date_from the field for the start date time iso 8601 search_term_release_date_to the field for the end date time iso 8601 1 4 mediafunctionmode enum for the param of media control function mode enum mediafunctionmode { "media_function_on", "media_function_off" }; the following values are supported media_function_on media function mode on media_function_off media function mode off 1 5 mediarotatemode enum for the param of rotate enum mediarotatemode { "media_rotate_left", "media_rotate_right" }; the following values are supported media_rotate_left media rotate mode left media_rotate_right media rotate mode right 1 6 mediazoommode enum for the param of zoom enum mediazoommode { "media_zoom_in", "media_zoom_out" }; the following values are supported media_zoom_in media zoom mode in media_zoom_out media zoom mode out 1 7 mediarepeatmode enum for the param of media repeat enum mediarepeatmode { "media_repeat_off", "media_repeat_one", "media_repeat_all" }; the following values are supported media_repeat_off media repeat mode off media_repeat_one media repeat mode for one track media_repeat_all media repeat mode for all tracks 1 8 listitem enum for the param of list item enum listitem { "list_bookmarks", "list_watch_later", "list_unknown" }; the following values are supported list_bookmarks bookmarks list_watch_later watchlater list_unknown unknown 2 interfaces 2 1 voiceinteractionmanagerobject the voiceinteractionmanagerobject interface defines what is instantiated by the webapis object from the tizen platform there will be a webapis voiceinteraction object that allows access to the functionality of the voice interaction api to use the voice interaction api, the following privileges must be declared in the manifest file of the application if they are not declared, all usage of these apis are blocked, and security exceptions are thrown to use these privileges, the minimum ‘required_version’ is 6 0 [nointerfaceobject] interface voiceinteractionmanagerobject { readonly attribute voiceinteractionmanager voiceinteraction; }; webapi implements voiceinteractionmanagerobject; since 6 0 attributes readonly voiceinteractionmanager voiceinteraction this attribute defines the namespace for voiceinteraction apis 2 2 voiceinteractioncallback every voice interaction application should implement a callback function, so that the assistant can operate the controls your application can interact with voice assistant by passing the callbacks in webapis voiceinteraction setcallback and calling webapis voiceinteraction listen except onupdatestate, onsearchcollection callbacks, the return value for the callback is the boolean flag for support or not if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function [callback, nointerfaceobject] interface voiceinteractioncallback { optional voiceapplicationstate onupdatestate ; optional boolean onnavigation voicenavigation voicenavigation ; optional boolean onsearch voicesearchterm voicesearchterm ; optional boolean onplay ; optional boolean onstop ; optional boolean onpause ; optional boolean onexit ; optional boolean onselection long voiceselection ; optional boolean ontitleselection domstring title ; optional boolean onfastforward ; optional boolean onrewind ; optional domstring onsearchcollection voicesearchterm voicesearchterm ; optional boolean onchangeappstate voiceapplicationstate state ; optional boolean onchangeprevioustrack ; optional boolean onchangenexttrack ; optional boolean onrestart ; optional boolean onskipbackward long offsetseconds ; optional boolean onskipforward long offsetseconds ; optional boolean onsetplayposition long position ; optional boolean onchangesubtitlemode mediafunctionmode mode ; optional boolean onchangeshufflemode mediafunctionmode mode ; optional boolean onchangescreenfitmode mediafunctionmode mode ; optional boolean onzoom mediazoommode zoom ; optional boolean onrotate mediarotatemode direction ; optional boolean onchange360mode mediafunctionmode mode ; optional boolean onchangerepeatmode mediarepeatmode mode ; optional boolean oncontinuewatching ; optional boolean oncustom domstring jsonobjectstring ; optional domstring onrequestcontentcontext ; optional boolean onadditiontolist listitem list ; optional boolean onremovalfromlist listitem list ; optional boolean onplaylist listitem list ; optional boolean onbrowselist listitem list ; optional boolean onskipad ; }; since 6 0 methods onupdatestate developers must specify the current application status to the onupdatestate function to get a proper voice control from the voice assistant this function is called right before processing every utterance, so that the voice assistant can be aware of the application status dynamically depending on the status, the callback function called could be different therefore, it is important to return the real status of the application optional voiceapplicationstate onupdatestate ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional voiceapplicationstate the status of the current application status "none" application is in its default status same as "player" status "list" the application is showing something in list during this status, the utterances "play this" or "play" will call onselection 0 the utterance "previous" will call onnavigation "nav_previous" "player" the application is playing a piece of content during this status, the utterance "play this" will call onplay since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; } } ; onnavigation to support navigation controls via voice, the application should have the following callbacks otherwise, the key event will be generated optional boolean onnavigation voicenavigation voicenavigation ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters voicenavigation the navigation enumeration via voice return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; }, onnavigation function voicenavigation { var bsupport = true; console log "onnavigation " + voicenavigation ; switch voicenavigation { case "nav_previous " // "previous page" break; case "nav_next" // "next page" break; case "nav_left" // "go to left" break; case "nav_right" // "move to right" break; case "nav_up" // "move up" break; case "nav_down" // "go down" break; // if there is no callback implementation for these enums, // tv will generate remote control key events "arrowright", "arrowleft", "arrowup", "arrowdown" case "nav_show_more" // "show me more" break; default bsupport = false; break; } return bsupport; } } ; onsearch for a contents search provided by the application, it can receive a search utterance to show the search results in order to support the search via voice, the application must be registered to samsung tv's companion search application and have the following callbacks the onsearch parameter has a specific format to learn more about it, please refer to the getdatafromsearchterm some callbacks are not called by default such as onsearch to receive all the callback signals on the development stage, request a key from samsung and apply the key to the manifest of your tizen application the following example shows how to add the "http //developer samsung com/tizen/metadata/support-vif-devfeature" key to the manifest file optional boolean onsearch voicesearchterm voicesearchterm ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters voicesearchterm the object contains the information via voice return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example <?xml version="1 0" encoding="utf-8"?> <widget xmlns="http //www w3 org/ns/widgets" tizen="http //tizen org/ns/widgets" id="http //yourdomain/voiceinteractionwebsample" version="1 0 0" viewmodes="maximized"> <access origin="" subdomains="true"></access> < application id="abcdefghrj voiceinteractionwebsample" package="abcdefghrj" required_version="6 0"/> <content src="index html"/> <feature name="http //tizen org/feature/screen size normal 1080 1920"/> <icon src="icon png"/> < metadata key="http //developer samsung com/tizen/metadata/support-vif-dev-feature" value="true"/> <name>voiceinteractionwebsample</name> < privilege name="http //developer samsung com/privilege/voicecontrol"/> < privilege name="http //developer samsung com/privilege/microphone"/> < profile name="tv-samsung"/> </widget> @endcode @param voicesearchterm the object contains the information via voice @see getdatafromsearchterm @throw none n/a @return boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function @code webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "home"; }, onsearch function voicesearchterm { console log "onsearch " + json stringify voicesearchterm ; var title = webapis voiceinteraction getdatafromsearchterm voicesearchterm, "search_term_title" ; var genre = webapis voiceinteraction getdatafromsearchterm voicesearchterm, "search_term_genre" ; console log "request to search " + title + ", " + genre ; return true; } } ; onplay supports the media control to handle playback play optional boolean onplay ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onplay function { // tv default action generates the remote control key, "mediaplay" console log "onplay called" ; return true; } } ; onstop supports the media control to handle playback stop optional boolean onstop ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onstop function { // tv default action generates the remote control key, "mediastop" console log "onstop called" ; return true; } } ; onpause supports the media control to handle playback pause optional boolean onpause ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onpause function { // tv default action generates the remote control key, "mediaplaypause" console log "onpause called" ; return true; } } ; onexit supports the media control to handle playback exit optional boolean onexit ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onexit function { // tv default action generates the remote control key, "exit" console log "onexit called" ; return true; } } ; onselection to support selection controls via voice, the application should have the following callbacks this callback supports the ordinal, relative selection control optional boolean onselection long voiceselection ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters voiceselection the relative index via voice, ex the last item is -1, the current item is 0, the first item is 1 return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; }, onselection function voiceselection { var bsupport = true; console log "onselection " + voiceselection ; switch voiceselection { case -1 // "select the last one" break; case 0 // "select this" break; default { if voiceselection >= 1 // "select the first one" { // select the voiceselection th item // index of the first item is 1 console log "for ordinal " + voiceselection ; } else { bsupport = false; } } break; } return bsupport; } } ; ontitleselection title selection refers to an utterance in the format "select {title name}" to support the title selection via voice, the following two callbacks are required onrequestcontentcontext and ontitleselection the onrequestcontentcontext callback provides the information regarding the content of the screen such as title and position to the samsung tv this method will be invoked at the beginning of every utterance the response consists of positionx int , positiony int , title string , alias string array and bfocused bool the title property is used for asr conversion and the other properties are used to set the priority of each title the ontitleselection callback receives the title name from the utterance optional boolean ontitleselection domstring title ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters title the string input via voice return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; }, onrequestcontentcontext function { console log "onrequestcontentcontext " ; var result = []; try { var item = { "positionx" 0, "positiony" 0, "title" "title text1", "alias" ["title1", "my text1"], "bfocused" true }; result push item ; var item2 = { "positionx" 1, "positiony" 0, "title" "title text2", "alias" ["title2", "my text2"], "bfocused" false }; result push item2 ; result push webapis voiceinteraction buildvoiceinteractioncontentcontextitem 2,0,"title text3", ["title3", "my text3"], false ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return webapis voiceinteraction buildvoiceinteractioncontentcontextresponse result ; }, ontitleselection function title { console log "ontitleselection" + title ; return true; } } ; onfastforward supports the media control to handle playback ff optional boolean onfastforward ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onfastforward function { // tv default action generates the remote control key, "mediafastforward" console log "onfastforward called" ; return true; } } ; onrewind supports the media control to handle playback rewind optional boolean onrewind ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "player"; }, onrewind function { // tv default action generates the remote control key, "mediarewind" console log "onrewind called" ; return true; } } ; onsearchcollection supports the search utterance appending to the default search application the value of the result for the search term optional domstring onsearchcollection voicesearchterm voicesearchterm ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters voicesearchterm the object contains the information via voice return value optional domstring the formatted value of the result for the search term since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "none"; }, onsearchcollection function voicesearchterm { log "onsearchcollection " + json stringify voicesearchterm ; var result = []; //appname and appid are of the ui application to get the payload on launch result push webapis voiceinteraction buildcollectiondeeplinkdata "a1b2c3d4ef mytizenappid", "mytizenapp", "page_id=123456&method=voice" ; return json stringify result ; } } ; onchangeappstate to support the utterance of shortcut commands, the application must have the onchangeappstate callback optional boolean onchangeappstate voiceapplicationstate state ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters state the application context via voice return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "none"; }, onchangeappstate function state { // tv default action launches the samsung tv firstscreen, menu or search application depending on the input parameter // "go to home", "go to settings", "go to search" console log "onchangeappstate " + state ; var bsupport = true; switch state { case "home" // go to app's home break; default bsupport = false; break; } return bsupport; } } ; onchangeprevioustrack in order to handle requests to move to the previous track via voice, the application should override the onchangeprevioustrack callback optional boolean onchangeprevioustrack ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangeprevioustrack function { console log "onchangeprevioustrack" ; return true; } } ; onchangenexttrack in order to handle requests to move to the next track via voice, the application should override the onchangenexttrack callback optional boolean onchangenexttrack ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangenexttrack function { console log "onchangenexttrack" ; return true; } } ; onrestart in order to handle requests to restart to this track via voice, the application should override the onrestart callback optional boolean onrestart ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onrestart function { console log "onrestart" ; return true; } } ; onskipbackward in order to handle requests to skip backward via voice, the application should override the onskipbackward callback optional boolean onskipbackward long offsetseconds ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters offsetseconds the relative position in seconds return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onskipbackward function offsetseconds { console log "onskipbackward " + offsetseconds ; return true; } } ; onskipforward in order to handle requests to skip forward via voice, the application should override the onskipforward callback optional boolean onskipforward long offsetseconds ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters offsetseconds the relative position in seconds return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onskipforward function offsetseconds { console log "onskipforward " + offsetseconds ; return true; } } ; onsetplayposition in order to handle requests to set play position via voice, the application should override the onsetplayposition callback optional boolean onsetplayposition long position ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters position the absolute position in seconds return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onsetplayposition function position { console log "onsetplayposition " + position ; return true; } } ; onchangesubtitlemode in order to handle requests to turn the subtitle feature on/off via voice, the application should override the onchangesubtitlemode callback optional boolean onchangesubtitlemode mediafunctionmode mode ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters mode media_function_on turning on / media_function_off turning off return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangesubtitlemode function mode { console log "onchangesubtitlemode" ; switch mode { case "media_function_on" console log "function on" ; break; default console log "function off" ; break; } return true; } } ; onchangeshufflemode in order to handle requests to turn the shuffle feature on/off via voice, the application should override the onchangeshufflemode callback optional boolean onchangeshufflemode mediafunctionmode mode ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters mode media_function_on turning on / media_function_off turning off return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangeshufflemode function mode { console log "onchangeshufflemode" ; switch mode { case "media_function_on" console log "function on" ; break; default console log "function off" ; break; } return true; } } ; onchangescreenfitmode in order to handle requests to turn the screen fit feature on/off via voice, the application should override the onchangescreenfitmode callback optional boolean onchangescreenfitmode mediafunctionmode mode ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters mode media_function_on turning on / media_function_off turning off return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangescreenfitmode function mode { console log "onchangescreenfitmode" ; switch mode { case "media_function_on" console log "function on" ; break; default console log "function off" ; break; } return true; } } ; onzoom in order to handle requests to zoom in/out via voice, the application should override the onzoom callback optional boolean onzoom mediazoommode zoom ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters zoom media_zoom_in zoom in / media_zoom_out zoom out return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onzoom function zoom { console log "onzoom" ; switch zoom { case "media_zoom_in" console log "zoom in" ; break; default console log "zoom out" ; break; } return true; } } ; onrotate in order to handle requests to rotate left/right via voice, the application should override the onrotate callback optional boolean onrotate mediarotatemode direction ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters direction media_rotate_left rotate left / media_rotate_right rotate right return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onrotate function direction { console log "onrotate" ; switch direction { case "media_rotate_left" console log "rotate left" ; break; default console log "rotate right" ; break; } return true; } } ; onchange360mode in order to handle requests to turn the 360 feature on/off via voice, the application should override the onchange360mode callback optional boolean onchange360mode mediafunctionmode mode ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters mode media_function_on turning on / media_function_off turning off return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchange360mode function mode { console log "onchange360mode" ; switch mode { case "media_function_on" console log "function on" ; break; default console log "function off" ; break; } return true; } } ; onchangerepeatmode in order to handle requests to change the repeat mode via voice, the application should override the onchangerepeatmode callback optional boolean onchangerepeatmode mediarepeatmode mode ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters mode media_repeat_off repeat mode off / media_repeat_one repeat this track / media_repeat_all repeat all tracks return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onchangerepeatmode function mode { console log "onchangerepeatmode" ; switch mode { case "media_repeat_one" console log "one" ; break; case "media_repeat_all" console log "all" ; break; default console log "off" ; break; } return true; } } ; oncontinuewatching in order to handle requests to launch the application with playing the history track via voice, the application should override the oncontinuewatching callback to play the history track this callback will be called after launching the application optional boolean oncontinuewatching ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung device may perform its basic function since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, oncontinuewatching function { console log "oncontinuewatching" ; return true; } } ; oncustom supports the custom voice assistant action optional boolean oncustom domstring jsonobjectstring ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters jsonobjectstring the string stringified json object return value optional boolean boolean value of whether the app supports this feature voice assistant action will get the response "{"result_code" "success"}" for true, "{"result_code" "failure"}" for false/undefined since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; }, oncustom function jsonobjectstring { console log "oncustom " + jsonobjectstring ; try { var customobject = json parse jsonobjectstring ; for var key in customobject { if customobject hasownproperty key { console log "key " + key + ", value " + customobject[key] ; } } } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; return false; } return true; } } ; onrequestcontentcontext in order to support the voice title selection via voice, the application should override the onrequestcontentcontext callback, return the jsonobject string for the current content context list showing optional domstring onrequestcontentcontext ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional domstring domstring containing jsonobject string for the content context list since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "list"; }, onrequestcontentcontext function { log "onrequestcontentcontext " ; var result = []; try { var item = webapis voiceinteraction buildvoiceinteractioncontentcontextitem 1,1,"test", ["test set", "test title"], true ; result push item ; var item2 = webapis voiceinteraction buildvoiceinteractioncontentcontextitem 2,1,"test2", ["test set 2", "test title 2"], false ; result push item2 ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return webapis voiceinteraction buildvoiceinteractioncontentcontextresponse result ; } } ; onadditiontolist in order to handle requests to add this context to list via voice, the application should override the onadditiontolist callback optional boolean onadditiontolist listitem list ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters list list_bookmarks bookmarks / list_watch_later watch later / list_preference preference / list_subscription subscription return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung tv may perform its basic function since 6 5 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onadditiontolist function list { console log "onadditiontolist" ; switch list { case "list_bookmarks" console log "add this context to bookmarks" ; break; case "list_watch_later" console log "add this context to watch later" ; break; case "list_preference" console log "like this context" ; break; case "list_subscription" console log "subscribe to context" ; break; default break; } return true; } } ; onremovalfromlist in order to handle requests to remove this context from list via voice, the application should override the onremovalfromlist callback optional boolean onremovalfromlist listitem list ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters list list_bookmarks bookmarks / list_watch_later watch later / list_preference preference / list_subscription subscription return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung tv may perform its basic function since 6 5 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onremovalfromlist function list { console log "onremovalfromlist" ; switch list { case "list_bookmarks" console log "remove this context from bookmarks" ; break; case "list_watch_later" console log "remove this context from watch later" ; break; case "list_preference" console log "dislike this context" ; break; case "list_subscription" console log "unsubscribe from this context" ; break; default break; } return true; } } ; onplaylist in order to handle requests to play this context from list via voice, the application should override the onplaylist callback optional boolean onplaylist listitem list ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters list list_preference preference / list_subscription subscription / list_watch_later watch later return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung tv may perform its basic function since 6 5 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onplaylist function list { console log "onplaylist" ; switch list { case "list_preference" console log "play liked content" ; break; case "list_subscription" console log "play subscription content" ; break; case "list_watch_later" console log "play watch later content" ; break; default break; } return true; } } ; onbrowselist in order to handle requests to browse this context from list via voice, the application should override the onbrowselist callback optional boolean onbrowselist listitem list ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters list list_preference preference / list_subscription subscription / list_watch_later watch later return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung tv may perform its basic function since 6 5 code example webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onbrowselist function list { console log "onbrowselist" ; switch list { case "list_preference" console log "browse liked content" ; break; case "list_subscription" console log "browse subscription content" ; break; case "list_watch_later" console log "browse watch later content" ; break; default break; } return true; } } ; onskipad in order to handle requests to skip ad content via voice, the application should override the onskipad callback optional boolean onskipad ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value optional boolean boolean value of whether the app supports this feature if a callback returns the false/undefined value, or there is no callback implementation for the utterance, samsung tv may perform its basic function since 6 5 code example webapis voiceinteraction setcallback { onupdatestate function { return "player"; }, onskipad function { console log "onskipad" ; return true; } } ; 2 3 voicesearchterm this interface represents information about the voice search term [nointerfaceobject] interface voicesearchterm { readonly attribute domstring? utterance; readonly attribute domstring? title; readonly attribute domstring? genre; readonly attribute domstring? cast; readonly attribute domstring? contenttype; readonly attribute domstring? from; readonly attribute domstring? to; }; attributes readonly domstring utterance [nullable] the field for the full utterance readonly domstring title [nullable] the field for the title readonly domstring genre [nullable] the field for the genre readonly domstring cast [nullable] the field for the cast readonly domstring contenttype [nullable] the field for the content type movie/tvshow readonly domstring from [nullable] the field for the start date time iso 8601 readonly domstring to [nullable] the field for the end date time iso 8601 2 4 voiceinteractioncontentcontext this interface represents information about the content context for an item [nointerfaceobject] interface voiceinteractioncontentcontext { attribute long positionx; attribute long positiony; attribute domstring title; attribute boolean bfocused; }; attributes long positionx the field for x-axis position of the item long positiony the field for y-axis position of the item domstring title the field for the title of the item boolean bfocused the field for whether this item has a focus 2 5 voiceinteractionmanager the voiceinteractionmanager interface is the top-level interface for the voiceinteractionmanager api that provides access to the module functionalities [nointerfaceobject] interface voiceinteractionmanager { domstring getversion ; void setcallback voiceinteractioncallback callback ; void listen ; domstring getdatafromsearchterm voicesearchterm voicesearchterm, voicesearchtermfield field ; domstring buildcollectiondeeplinkdata domstring appid, domstring title, domstring payload ; domstring buildcollectionshowdata domstring appid, domstring title, domstring payload, domstring thumbnail ; voiceinteractioncontentcontext buildvoiceinteractioncontentcontextitem long positionx, long positiony, domstring title, domstring[] aliasarr, boolean bfocused ; domstring buildvoiceinteractioncontentcontextresponse voiceinteractioncontentcontext[] contentcontextarr ; }; methods getversion this method gets the plugin's version number domstring getversion ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol return value domstring domstring return value of plugin's version exceptions webapiexception with error type unknownerror in any other error case with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { var version = webapis voiceinteraction getversion ; console log "works with voiceinteraction [" + version + "]" ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } setcallback api to define callback functions for the voice interaction commands void setcallback voiceinteractioncallback callback ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters callback composing the functions to be called for the voice interaction commands exceptions webapiexception with error type unknownerror in any other error case with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { webapis voiceinteraction setcallback { onupdatestate function { return "list"; }, onnavigation function vn { console log "onnavigation" + vn ; return true; }, onselection function voiceselection { console log "onselection" + voiceselection ; return true; } } ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } listen api to start listening the voice interaction commands after setting callbacks by setcallback void listen ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol exceptions webapiexception with error type unknownerror in any other error case with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { webapis voiceinteraction listen ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } getdatafromsearchterm api to parse the searchterm from samsung side domstring getdatafromsearchterm voicesearchterm voicesearchterm, voicesearchtermfield field ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters voicesearchterm the voicesearchterm from samsung side as search term field the field enum to get the value return value domstring the result string formatted exceptions webapiexception with error type unknownerror in any other error case with error type securityerror, if the application does not have the privilege to call this method with error type invalidvalueserror, if any input parameter contains an invalid value with error type typemismatcherror, if an input parameter is not compatible with its expected type since 6 0 code example var title = webapis voiceinteraction getdatafromsearchterm voicesearchterm, "search_term_title" ; var genre = webapis voiceinteraction getdatafromsearchterm voicesearchterm, "search_term_genre" ; buildcollectiondeeplinkdata api to build data for search collection easily domstring buildcollectiondeeplinkdata domstring appid, domstring title, domstring payload ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters appid the app id to be shown in the search application, and to launch the payload title the title to be shown in the search application payload the payload value to be passed with application launch request return value domstring the result string formatted exceptions webapiexception with error type unknownerror in any other error case with error type typemismatcherror, if any input parameter is not domstring type with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "none"; }, onsearchcollection function voicesearchterm { log "onsearchcollection " + json stringify voicesearchterm ; var result = []; // appname and appid are of the ui application to get the payload on launch try { result push webapis voiceinteraction buildcollectiondeeplinkdata "a1b2c3d4ef mytizenappid", "mytizenapp", "page_id=123456&method=voice" ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return json stringify result ; } } ; buildcollectionshowdata api to build data for search collection easily domstring buildcollectionshowdata domstring appid, domstring title, domstring payload, domstring thumbnail ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters appid the app id to be shown in the search application, and to launch the payload title the title to be shown in the search application payload the payload value to be passed with application launch request thumbnail the thumbnail url, path to be shown in the search application return value domstring the result string formatted exceptions webapiexception with error type unknownerror in any other error case with error type typemismatcherror, if any input parameter is not domstring type with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example webapis voiceinteraction setcallback { onupdatestate function { console log "assistant tries to get app state" ; return "none"; }, onsearchcollection function voicesearchterm { log "onsearchcollection " + json stringify voicesearchterm ; var result = []; // appname and appid are of the ui application to get the payload on launch try { result push webapis voiceinteraction buildcollectionshowdata "a1b2c3d4ef mytizenappid", "mytizenapp", "page_id=123456&method=voice", "http //myservice com/content/123456 png" ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return json stringify result ; } } ; buildvoiceinteractioncontentcontextitem api to build the voiceinteractioncontentcontext of an item voiceinteractioncontentcontext buildvoiceinteractioncontentcontextitem long positionx, long positiony, domstring title, domstring[] aliasarr, boolean bfocused ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters positionx x-axis position of the item positiony y-axis position of the item title the title of the item aliasarr the alias titles of the item bfocused whether this item has a focus return value voiceinteractioncontentcontext the voiceinteractioncontentcontext object containing an item showing exceptions webapiexception with error type unknownerror in any other error case with error type typemismatcherror, if any input parameters are not compatible with its expected type since 6 0 code example onrequestcontentcontext function { console log "onrequestcontentcontext " ; var result = []; try { var item = webapis voiceinteraction buildvoiceinteractioncontentcontextitem 1,1,"test", ["test set", "test title"], true ; result push item ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return webapis voiceinteraction buildvoiceinteractioncontentcontextresponse result ; } buildvoiceinteractioncontentcontextresponse api to build the response of onrequestcontentcontext callback function from voiceinteractioncontentcontext domstring buildvoiceinteractioncontentcontextresponse voiceinteractioncontentcontext[] contentcontextarr ; product tv privilege level public privilege http //developer samsung com/privilege/voicecontrol parameters contentcontextarr voiceinteractioncontentcontext objects of the items showing return value domstring the domstring of jsonobject string containing the items showing exceptions webapiexception with error type unknownerror in any other error case with error type typemismatcherror, if any input parameters are not compatible with its expected type since 6 0 code example onrequestcontentcontext function { console log "onrequestcontentcontext " ; var result = []; try { var item = webapis voiceinteraction buildvoiceinteractioncontentcontextitem 1,1,"test", ["test set", "test title"], true ; result push item ; } catch e { console log "exception [" + e code + "] name " + e name + " message " + e message ; } return webapis voiceinteraction buildvoiceinteractioncontentcontextresponse result ; } 3 full webidl module voiceinteraction { enum voiceapplicationstate { "none", "home", "list", "player", "setting", "search", "unknown" }; enum voicenavigation { "nav_previous", "nav_next", "nav_left", "nav_right", "nav_up", "nav_down", "nav_show_more", "nav_unknown" }; enum voicesearchtermfield { "search_term_utterance", "search_term_title", "search_term_genre", "search_term_cast", "search_term_content_type", "search_term_release_date_from", "search_term_release_date_to" }; enum mediafunctionmode { "media_function_on", "media_function_off" }; enum mediarotatemode { "media_rotate_left", "media_rotate_right" }; enum mediazoommode { "media_zoom_in", "media_zoom_out" }; enum mediarepeatmode { "media_repeat_off", "media_repeat_one", "media_repeat_all" }; enum listitem { "list_bookmarks", "list_watch_later", "list_unknown" }; [nointerfaceobject] interface voiceinteractionmanagerobject { readonly attribute voiceinteractionmanager voiceinteraction; }; webapi implements voiceinteractionmanagerobject; [callback, nointerfaceobject] interface voiceinteractioncallback { optional voiceapplicationstate onupdatestate ; optional boolean onnavigation voicenavigation voicenavigation ; optional boolean onsearch voicesearchterm voicesearchterm ; optional boolean onplay ; optional boolean onstop ; optional boolean onpause ; optional boolean onexit ; optional boolean onselection long voiceselection ; optional boolean ontitleselection domstring title ; optional boolean onfastforward ; optional boolean onrewind ; optional domstring onsearchcollection voicesearchterm voicesearchterm ; optional boolean onchangeappstate voiceapplicationstate state ; optional boolean onchangeprevioustrack ; optional boolean onchangenexttrack ; optional boolean onrestart ; optional boolean onskipbackward long offsetseconds ; optional boolean onskipforward long offsetseconds ; optional boolean onsetplayposition long position ; optional boolean onchangesubtitlemode mediafunctionmode mode ; optional boolean onchangeshufflemode mediafunctionmode mode ; optional boolean onchangescreenfitmode mediafunctionmode mode ; optional boolean onzoom mediazoommode zoom ; optional boolean onrotate mediarotatemode direction ; optional boolean onchange360mode mediafunctionmode mode ; optional boolean onchangerepeatmode mediarepeatmode mode ; optional boolean oncontinuewatching ; optional boolean oncustom domstring jsonobjectstring ; optional domstring onrequestcontentcontext ; optional boolean onadditiontolist listitem list ; optional boolean onremovalfromlist listitem list ; optional boolean onplaylist listitem list ; optional boolean onbrowselist listitem list ; optional boolean onskipad ; }; [nointerfaceobject] interface voicesearchterm { readonly attribute domstring? utterance; readonly attribute domstring? title; readonly attribute domstring? genre; readonly attribute domstring? cast; readonly attribute domstring? contenttype; readonly attribute domstring? from; readonly attribute domstring? to; }; [nointerfaceobject] interface voiceinteractioncontentcontext { attribute long positionx; attribute long positiony; attribute domstring title; attribute boolean bfocused; }; [nointerfaceobject] interface voiceinteractionmanager { domstring getversion ; void setcallback voiceinteractioncallback callback ; void listen ; domstring getdatafromsearchterm voicesearchterm voicesearchterm, voicesearchtermfield field ; domstring buildcollectiondeeplinkdata domstring appid, domstring title, domstring payload ; domstring buildcollectionshowdata domstring appid, domstring title, domstring payload, domstring thumbnail ; voiceinteractioncontentcontext buildvoiceinteractioncontentcontextitem long positionx, long positiony, domstring title, domstring[] aliasarr, boolean bfocused ; domstring buildvoiceinteractioncontentcontextresponse voiceinteractioncontentcontext[] contentcontextarr ; }; };
Develop Mobile Galaxy S Pen Remote
apipackage class tree deprecated index help com.samsung.android.sdk.penremote class buttonevent java.lang.object com.samsung.android.sdk.penremote.buttonevent public class buttonevent extends object a class that extracts button related information from an spenevent. field summary fields modifier and type field and description static int action_down a pressed gesture has started. static int action_up a pressed gesture has finished. constructor summary constructors constructor and description buttonevent(spenevent spenevent) create a buttonevent from spenevent object. method summary all methods instance methods concrete methods modifier and type method and description int getaction() returns the kind of action being performed. long gettimestamp() returns time in nanosecond at which the event happened. methods inherited from class java.lang.object clone, equals, finalize, getclass, hashcode, notify, notifyall, tostring, wait, wait, wait field detail action_down public static final int action_down a pressed gesture has started. see also: constant field values action_up public static final int action_up a pressed gesture has finished. see also: constant field values constructor detail buttonevent public buttonevent(spenevent spenevent) create a buttonevent from spenevent object. parameters: spenevent - spenevent has button information. since: 1.0.0 method detail getaction public int getaction() returns the kind of action being performed. returns: the action, such as action_down or action_up. since: 1.0.0 gettimestamp public long gettimestamp() returns time in nanosecond at which the event happened. returns: time in nanosecond at which the event happened. since: 1.0.0
Develop Smart Hospitality Display
docweb inspector features this topic describes web inspector features you can use to help debug and optimize your application the web inspector provides a debugging environment where you can, for example, control javascript execution and monitor various information about your application while it runs the web inspector has the following tabs elements the "elements" tab allows you to see the web page components the css style, event listeners, and properties console the "console" tab allows you to inspect the javascript console operation you can interact with your page programmatically any errors or warnings on your page are shown in the console sources the "sources" tab allows you to inspect the javascript source page and debug your javascript code this tab supports watch expressions, callstack, scope variables, and break point operation in addition, it supports basic debugging operations continue, step over, step into, and step out network the "network" tab allows you to inspect resources downloaded over the network timeline the "timeline" tab allows you to perform advanced timing and speed analysis you can see how long the browser takes to handle dom events, and render and paint windows on the timeline, the time spent loading and rendering the application content is shown with colored bars loading blue time spent loading html content scripting yellow time spent loading javascript files rendering violet time spent rendering content painting green time spent loading graphics, such as images and icons profiles the "profiles" tab allows you to inspect the javascript performance analyses you can inspect cpu, heap, and memory allocation profiles application the "application" tab allows you to inspect resources you can interact with frames containing resources, such as html, javascript, css, images, and fonts you can also inspect websql and html5 databases, local storage, cookies, and the application cache audits the "audits" tab allows you to analyze a page as it loads and provide suggestions and optimizations for decreasing load time and increase perceived or real responsiveness
Develop Smart Signage
docweb inspector features this topic describes web inspector features you can use to help debug and optimize your application the web inspector provides a debugging environment where you can, for example, control javascript execution and monitor various information about your application while it runs the web inspector has the following tabs elements the "elements" tab allows you to see the web page components the css style, event listeners, and properties console the "console" tab allows you to inspect the javascript console operation you can interact with your page programmatically any errors or warnings on your page are shown in the console sources the "sources" tab allows you to inspect the javascript source page and debug your javascript code this tab supports watch expressions, callstack, scope variables, and break point operation in addition, it supports basic debugging operations continue, step over, step into, and step out network the "network" tab allows you to inspect resources downloaded over the network timeline the "timeline" tab allows you to perform advanced timing and speed analysis you can see how long the browser takes to handle dom events, and render and paint windows on the timeline, the time spent loading and rendering the application content is shown with colored bars loading blue time spent loading html content scripting yellow time spent loading javascript files rendering violet time spent rendering content painting green time spent loading graphics, such as images and icons profiles the "profiles" tab allows you to inspect the javascript performance analyses you can inspect cpu, heap, and memory allocation profiles application the "application" tab allows you to inspect resources you can interact with frames containing resources, such as html, javascript, css, images, and fonts you can also inspect websql and html5 databases, local storage, cookies, and the application cache audits the "audits" tab allows you to analyze a page as it loads and provide suggestions and optimizations for decreasing load time and increase perceived or real responsiveness
Develop Smart TV
docextension libraries extension libraries are additional features supported by the samsung smart tv these features are built-in and you can use them to further enhance your application the features include, for example, the following libraries webassembly webassembly provides a way to run code written in among others c and c++ on the web at near native speed using the webassembly javascript apis, you can load webassembly modules into a javascript smart tv app and share functionality between the two learn more | get sdk smart view sdk extend your mobile applications to the big screen create seamless tv and mobile experiences using android, javascript, and ios apis learn more | get sdk nacl the native client nacl technology allows you to run native c/c++ applications in a web browser use the power of native code to enhance the performance of your tizen tv web applications learn more | get sdk importantdue to nacl deprecation by the chromium project, tizen tv will continue its support for nacl only until 2021-year products meanwhile, tizen tv will start focusing on high-performance, cross-browser webassembly from 2020-year products toast toast is a very useful tool for tv web application developers samsung has created toast, an open source project, to reduce overhead in tv web application development learn more caph caph is a web application ui framework designed for easy and quick smart tv web application development you can develop visually-impressive applications using the caph framework learn more | get sdk
Develop Smart TV
docweb inspector features this topic describes web inspector features you can use to help debug and optimize your application the web inspector provides a debugging environment where you can, for example, control javascript execution and monitor various information about your application while it runs the web inspector has the following tabs elements the "elements" tab allows you to see the web page components the css style, event listeners, and properties console the "console" tab allows you to inspect the javascript console operation you can interact with your page programmatically any errors or warnings on your page are shown in the console sources the "sources" tab allows you to inspect the javascript source page and debug your javascript code this tab supports watch expressions, callstack, scope variables, and break point operation in addition, it supports basic debugging operations continue, step over, step into, and step out network the "network" tab allows you to inspect resources downloaded over the network timeline the "timeline" tab allows you to perform advanced timing and speed analysis you can see how long the browser takes to handle dom events, and render and paint windows on the timeline, the time spent loading and rendering the application content is shown with colored bars loading blue time spent loading html content scripting yellow time spent loading javascript files rendering violet time spent rendering content painting green time spent loading graphics, such as images and icons profiles the "profiles" tab allows you to inspect the javascript performance analyses you can inspect cpu, heap, and memory allocation profiles application the "application" tab allows you to inspect resources you can interact with frames containing resources, such as html, javascript, css, images, and fonts you can also inspect websql and html5 databases, local storage, cookies, and the application cache audits the "audits" tab allows you to analyze a page as it loads and provide suggestions and optimizations for decreasing load time and increase perceived or real responsiveness
Watch Face Studio
docfaq q01 if i create a watch face using watch face studio, is it supported on all wear os watch devices? watch face studio is compatible with all wear os watch devices running api level 30 and higher if you create a watch face in watch face studio, you can use it on all wear os watch devices, regardless of manufacturer however, because of limitations with deprecated apis, your watch face may not be available on devices that are still using deprecated apis the galaxy watch studio serves tizen’s galaxy watch 1, 2, and 3 q02 does watch face studio support all types of watch face shapes, including circular and square? in watch face studio, the watch shape is set to a circle by default to support other watch face shapes, disable the apply circular crop option in the watch face canvas properties when circular crop is disabled, the watch face shape is determined by the user’s device to ensure watch face components display correctly, avoid placing components directly on the edges of the watch face the image can shift on some devices to prevent screen burn-in watch face studio creates a project with a single screen resolution, but the created watch face supports all device resolutions q03 how can i design my watch face to save battery? you can reduce battery usage through the following strategies use darker colors on the watch face make sure the images are fitted to the screen make sure you have removed all unused layers before building the watch face package for more information, see performance tips q04 how can i improve the performance of my watch face? using too many components in your watch face can degrade the performance of the watch face and consume the device battery more to optimize the use of components make sure fewer than 8 complications are visible in both ambient and normal modes make sure there are no hidden layers in either ambient or normal modes q05 how does my watch face work in always-on ambient mode? the second hand is not supported in ambient mode design your watch face to hide the second hand in ambient mode the on-pixel ratio opr varies between device models to find the opr for a specific device, check the device specification to examine the on-pixel performance of your design in ambient mode for various device shapes, in the run preview, select analyze you can also analyze the on-pixel performance for circular devices when you use the run on device and publish features in watch face studio q06 how can i enable users to customize their watch face? to enable watch face customization, define themes and styles for the watch face in the style property window the user can select from the themes and styles you have defined you can define a theme color palette and apply those colors to the component layers you can also implement multiple images for the analog hands, image, multimedia, and index components remember to give each component and style a clear, descriptive name the names appear when the user uses the customize mode to personalize their watch face you can also implement localized component names using text ids for more information, see project settings q07 what is the difference between the step counter tag expressions [sc], [sc_per], and [sc_goal]? the [sc] tag is the measured step count the [sc_goal] tag represents the step goal the user’s step goal can be synchronized from a supported health application, or you can define a step goal for the watch face to configure the step goal for your watch face, in wfs, go to file > project > settings > health the [sc_per] tag is the percentage of the step goal achieved, automatically calculated from the step count and step goal q08 how do i sell my watch face in a region that is not supported by the play store? watch faces can be sold in unsupported countries through the device manufacturer’s own app store for example, watch faces for galaxy watch can be sold through galaxy apps for more information, see galaxy store seller portal different app stores can support different file types for watch faces, such as apk or aab you must create the appropriate watch face package for each store q09 why can't i find the 'enable debugging over the bluetooth' setting in galaxy wearable application on my phone? check that your wearable device supports bluetooth debugging debug over bluetooth is not supported on wear 3 devices for more information, see debug over bluetooth q10 why can’t i use lottie multimedia files on my watch face anymore? lottie files are no longer supported since watch face studio version 1 4 13 you must replace them with animations in a supported format, such as webp or animated gif q11 how does the step goal "sync to device" feature work? the sync to device feature enables your watch face to use the step goal defined by the user on their device’s health application it is supported on watch devices running api level 33 and higher wear 4 and later on wear 3 devices, because sync to device is not supported, the step goal is fixed to 6000 if you want to set a different step goal for wear 3 devices, you must create a separate watch face version for wear 3, disable sync to device, and define the step goal directly q12 why are some heart rate tag expressions and features not supported for my watch face? some tag expressions and features related to measuring heart rate on wear os watch devices running api level 30 are not supported by watch face studio v1 4 13 however, wfs supports synchronizing the measured heart rate value with the value displayed on the screen on wear os watch devices running api level 33 and higher and galaxy watch devices for wear os powered by samsung, the open app feature supports opening the health application to view heart rate information on those devices q13 why can't i group a complication slot with other components or combine multiple complications? in watch face studio, complications must be implemented independently they cannot be grouped with or be part of another element complications can only contain elements within them
Develop Smart TV
dochello world in c importantdue to nacl deprecation by the chromium project, tizen tv will continue its support for nacl only until 2021-year products meanwhile, tizen tv will start focusing on high-performance, cross-browser webassembly from 2020-year products this topic describes the "hello world in c" sample application implementation samples hello world in c this tutorial describes how to implement a simple "hello world" native client nacl application in c the nacl module waits for a message from the javascript component, creates a reply message by appending the received string to a predefined string, and sends it as a reply back to the javascript component, which displays the message on the screen the following figure shows the sample application when the nacl module has loaded, the "status" field text changes to "loaded" in the "nacl messages" section, the message "echo from nacl hello world from js" appears for information on how to access the sample application cheat sheet and run the application, see sample-based tutorials to implement the "hello world" nacl application in c initialize the module a nacl module in c must implement the following 2 functions the ppp_initializemodule function is an entry point for the nacl plugin and is called when the module is loaded on the web page you must initialize interfaces and resources in this function, including the following mandatory interfaces the ppb_messaging interface implements the postmessage function, which allows the nacl plugin to send messages to the javascript component this interface is used to send the reply message to the javascript component the ppb_var interface creates and manages pp_var objects, which are wrappers for javascript variables in c code this interface is used to convert c-style strings to javascript variables, which can be sent to the javascript component using the ppb_messaging interface /* global pointers to selected browser interfaces */ const ppb_messaging* g_messaging_interface; const ppb_var* g_var_interface; /** * entry point to the nacl module, called while the module is being initialized * this function is obligatory; initialize interfaces in this function */ pp_export int32_t ppp_initializemodule pp_module module_id, ppb_getinterface get_browser_interface { // initialize pointers to used browser interfaces g_messaging_interface = const ppb_messaging* get_browser_interface ppb_messaging_interface ; g_var_interface = const ppb_var* get_browser_interface ppb_var_interface ; return pp_ok; } the ppp_shutdownmodule function is used internally by google chrome™ and must be left empty /** * implementation-specific function for internal use only * this function is obligatory, but leave it empty * @see <code>ppp_shutdownmodule</code> in ppp h file */ pp_export void ppp_shutdownmodule { } for more information on the above functions, see the "include/ppapi/c/ppp h" file in your "nacl_sdk/pepper_xx" directory importantto compile the nacl code successfully, the ppp_initializemodule and ppp_shutdownmodule functions must be implemented with these exact names implement the instance-specific functions when developing a nacl application in c, you must implement all the following functions specific to the ppp_instance interface, even if they are empty in the instance_didcreate function, define the actions to perform when the instance is created, such as its initialization logic the function returns pp_true if the instance creation was successful, or pp_false otherwise in the sample application, no initialization logic is needed, so the function always returns pp_true static pp_bool instance_didcreate pp_instance instance, uint32_t argc, const char* argn[], const char* argv[] { return pp_true; } in the instance_diddestroy function, define the actions to perform when the instance is destroyed, such as releasing any acquired instance-specific resources in the sample application, the instance has nothing to release, so the function is empty static void instance_diddestroy pp_instance instance { } in the instance_didchangeview function, define the actions to perform when the application viewport is created or changed in any way the sample application does not use graphics, so the function is empty static void instance_didchangeview pp_instance pp_instance, pp_resource view { } in the instance_didchangefocus function, define the actions to perform when the embedded nacl module gains or loses focus this functionality is not needed in the sample application, so the function is empty static void instance_didchangefocus pp_instance pp_instance, pp_bool has_focus { } the instance_handledocumentload function is not used in tizen nacl applications, and must return pp_false static pp_bool instance_handledocumentload pp_instance pp_instance, pp_resource pp_url_loader { return pp_false; } for more information on the above functions, see the "include/ppapi/c/ppp_instance h" file in your "nacl_sdk/pepper_xx" directory to receive messages, implement the messaging_handlemessage function of the ppp_messaging interface when the nacl module receives a message from the javascript component extract the message from the pp_var object concatenate the message to the predefined echo string, using the c standard library snprintf function convert the char buffer to a pp_var object using the ppb_var interface send the message to the javascript component using the postmessage function of the ppb_messaging interface const char* kecho = "echo from nacl "; /** * handles messages from js sent by the nacl_module postmessage function */ void messaging_handlemessage pp_instance instance, struct pp_var message { char str_buff[64]; uint32_t len; // extract the char array from the message pp_var structure const char* message_str = g_var_interface->vartoutf8 message, &len ; if message_str == null return; snprintf str_buff, sizeof str_buff , "%s%s\n", kecho, message_str ; // create a pp_var containing the message body struct pp_var var_response = g_var_interface->varfromutf8 str_buff, strlen str_buff ; // post the message to the javascript layer g_messaging_interface->postmessage instance, var_response ; } for more information on the handlemessage function, see the "include/ppapi/c/ppp_messaging h" file in your "nacl_sdk/pepper_xx" directory connect the interfaces to the nacl module to connect the implemented interfaces, you must implement the ppp_getinterface function, which takes a c-style string as a parameter and returns a const void pointer the function is called multiple times during application initialization, checking for ppp interfaces that have been implemented for each implemented interface, return a structure containing pointers to the interface functions /** * this mandatory function retrieves the interface implementations that this module supports */ pp_export const void* ppp_getinterface const char* interface_name { if strcmp interface_name, ppp_instance_interface == 0 { // the module must fill this structure interface in the following order // and return it in this case static ppp_instance instance_interface = { &instance_didcreate, &instance_diddestroy, &instance_didchangeview, &instance_didchangefocus, &instance_handledocumentload }; return &instance_interface; } if strcmp interface_name, ppp_messaging_interface == 0 { // to handle messages, implement the ppp_messaging interface and // return it as a pointer to this structure static ppp_messaging messaging_interface = { &messaging_handlemessage }; return &messaging_interface; } return null; } for more information on the ppp_getinterface function, see the "include/ppapi/c/ppp h" file in your "nacl_sdk/pepper_xx" directory
Design One UI Watch for Tizen
docvoice interactions voice interactions use the users' voices for input. speech-to-text converts voice into text, and voice commands perform a task. it helps users control their watches when they are busy doing something else. interaction function speech to text converts voice to text voice commands commands by voice
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
These cookies gather information about your browser habits. They remember that you've visited our website and share this information with other organizations such as advertisers.
You have successfully updated your cookie preferences.