Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Recommendations
Filter
Develop Smart TV
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } getfirmware retrieves the firmware information domstring getfirmware ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring firmware version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getfirmware ; console log " firmware value = " + value ; } catch error { console log " error code = " + error code ; } getduid retrieves the duid from support > about tv > unique id domstring getduid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring duid exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getduid ; console log " duid value = " + value ; } catch error { console log " error code = " + error code ; } getmodelcode retrieves the model code, such as "15_hawkp" domstring getmodelcode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model code exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodelcode ; console log " modelcode value = " + value ; } catch error { console log " error code = " + error code ; } getmodel retrieves the model name, such as "ujs9500" domstring getmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodel ; console log " model value = " + value ; } catch error { console log " error code = " + error code ; } getlicensedbrand retrieves the brand information, valid only for licensing product domstring getlicensedbrand ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring brand information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type notsupportederror, if this api is called for "samsung" products since 7 0 code example try { var value = webapis productinfo getlicensedbrand ; console log " brand information value = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvservertype retrieves the infolink server type productinfosiservertype getsmarttvservertype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value productinfosiservertype infolink server type exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvservertype ; console log " smart tv server type = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvserverversion retrieves the infolink server version, such as "t-infolink2014-1002" domstring getsmarttvserverversion ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring infolink server version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvserverversion ; console log " smart tv server version = " + value ; } catch error { console log " error code = " + error code ; } isudpanelsupported checks whether udpanel is supported boolean isudpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo isudpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } is8kpanelsupported checks whether 8k panel is supported boolean is8kpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 4 0 code example try { var value = webapis productinfo is8kpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } getrealmodel retrieves the full model name, such as un65js9500 domstring getrealmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getrealmodel ; console log " modelname value = " + value ; } catch error { console log " error code = " + error code ; } iswallmodel checks whether the product model is wall boolean iswallmodel ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true wall model false not wall model exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 5 0 code example try { var value = webapis productinfo iswallmodel ; console log value ; } catch error { console log " error code = " + error code ; } getlocalset retrieves the local set information that is set in the device domstring getlocalset ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring localset value exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getlocalset ; console log " localset value = " + value ; } catch error { console log " error code = " + error code ; } getsystemconfig retrieves the value for the specified system configuration key, such as service country code any getsystemconfig productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key return value any system configuration value only for config_key_aot_support key the return type is boolean, the return type for other case is domstring exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsystemconfig webapis productinfo productinfoconfigkey config_key_data_service ; console log "systemconfig value = " + value ; } catch error { console log " error code = " + error code ; } setsystemconfig sets the value for the specified system configuration key void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key value value to set onsuccess [optional][nullable] callback method to invoke when the system configuration key value is successfully set onerror [optional][nullable] callback method to invoke if an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value if only setsystemconfig can set config_key_data_service or config_key_active_category since plugin version 3 0 with error type notsupportederror, if 'config_key_service_country' is readonly deprecated since plugin version 3 0 with error type notsupportederror, if 'config_key_shoplogo' is readonly deprecated since plugin version 3 0 since 2 3 code example function onsuccess data { console log "systemconfig data = " + data ; } function onerror error { console log "error code " + error code ; } try { webapis productinfo setsystemconfig webapis productinfo productinfoconfigkey config_key_data_service, value, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } addsystemconfigchangelistener registers a system configuration change listener unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key productinfo configuration key listener productinfoconfigchangecallback listener return value unsigned long listener id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid or unchangeable value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo addsystemconfigchangelistener webapis productinfo productinfoconfigkey config_key_data_service, listener ; console log " add listener value = " + value ; } catch error { console log " error code = " + error code ; } removesystemconfigchangelistener unregisters a system configuration change listener void removesystemconfigchangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters listenerid productinfoconfigchangecallback id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { webapis productinfo removesystemconfigchangelistener listenerid ; console log " removedlistener value " ; } catch error { console log " error code = " + error code ; } isuhdamodel checks whether the device supports ultra hd premium features boolean isuhdamodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 3 0 code example try { var value = webapis productinfo isuhdamodel ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } isdisplayrotatorsupported this method check whether display rotator is supported or not boolean isdisplayrotatorsupported ; product tv privilege n return value boolean true if display rotator is supported, else false since 5 5 code example var value = webapis productinfo isdisplayrotatorsupported ; console log "display rotator is supported = " + value ; getlicensedvendor this method get an actual manufacturer's information domstring getlicensedvendor ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring actual manufacturer information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { var value = webapis productinfo getlicensedvendor ; console log " getlicensedvendor value = " + value ; } catch error { console log " error code = " + error code ; } isoledpanelsupported checks whether oledpanel is supported boolean isoledpanelsupported ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 8 0 code example try { var value = webapis productinfo isoledpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } 1 3 productinfoconfigchangecallback defines the product info configuration change callback [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; methods onchange callback method for product info configuration changes void onchange productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key key of each productinfo config since 2 3 code example var onchange = function key { console log " changed key is = " + key ; } 1 4 productinfoconfigkey defines constants for product info configuration keys [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; since 2 3 constants config_key_data_service data service configuration, it can be setted as string ype with numbers since 2 3 config_key_service_country service country, readonly since 2 3 1 5 productinfonoglass3dsupport defines constants for glasses-free 3d support [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; since 2 3 constants no_glass_3d_not_supported glasses-free 3d is not supported since 2 3 no_glass_3d_supported glasses-free 3d is supported since 2 3 1 6 productinfosiservertype defines constants for infolink server types [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; since 2 3 constants si_type_operatiing_server operating since 2 3 si_type_development_server development since 2 3 si_type_developing_server developing since 2 3 2 full webidl module productinfo { [nointerfaceobject] interface productinfomanagerobject { readonly attribute productinfomanager productinfo; }; webapi implements productinfomanagerobject; [nointerfaceobject] interface productinfomanager { attribute productinfoconfigkey productinfoconfigkey; attribute productinfonoglass3dsupport productinfonoglass3dsupport; attribute productinfosiservertype productinfosiservertype; domstring getversion ; domstring getfirmware ; domstring getduid ; domstring getmodelcode ; domstring getmodel ; domstring getlicensedbrand ; productinfosiservertype getsmarttvservertype ; domstring getsmarttvserverversion ; boolean isudpanelsupported ; boolean is8kpanelsupported ; domstring getrealmodel ; boolean iswallmodel ; domstring getlocalset ; any getsystemconfig productinfoconfigkey key ; void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; void removesystemconfigchangelistener unsigned long listenerid ; boolean isuhdamodel ; boolean isdisplayrotatorsupported ; domstring getlicensedvendor ; boolean isoledpanelsupported ; }; [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; };
Develop Smart Hospitality Display
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } getfirmware retrieves the firmware information domstring getfirmware ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring firmware version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getfirmware ; console log " firmware value = " + value ; } catch error { console log " error code = " + error code ; } getduid retrieves the duid from support > about tv > unique id domstring getduid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring duid exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getduid ; console log " duid value = " + value ; } catch error { console log " error code = " + error code ; } getmodelcode retrieves the model code, such as "15_hawkp" domstring getmodelcode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model code exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodelcode ; console log " modelcode value = " + value ; } catch error { console log " error code = " + error code ; } getmodel retrieves the model name, such as "ujs9500" domstring getmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodel ; console log " model value = " + value ; } catch error { console log " error code = " + error code ; } getlicensedbrand retrieves the brand information, valid only for licensing product domstring getlicensedbrand ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring brand information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type notsupportederror, if this api is called for "samsung" products since 7 0 code example try { var value = webapis productinfo getlicensedbrand ; console log " brand information value = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvservertype retrieves the infolink server type productinfosiservertype getsmarttvservertype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value productinfosiservertype infolink server type exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvservertype ; console log " smart tv server type = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvserverversion retrieves the infolink server version, such as "t-infolink2014-1002" domstring getsmarttvserverversion ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring infolink server version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvserverversion ; console log " smart tv server version = " + value ; } catch error { console log " error code = " + error code ; } isudpanelsupported checks whether udpanel is supported boolean isudpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo isudpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } is8kpanelsupported checks whether 8k panel is supported boolean is8kpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 4 0 code example try { var value = webapis productinfo is8kpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } getrealmodel retrieves the full model name, such as un65js9500 domstring getrealmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getrealmodel ; console log " modelname value = " + value ; } catch error { console log " error code = " + error code ; } iswallmodel checks whether the product model is wall boolean iswallmodel ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true wall model false not wall model exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 5 0 code example try { var value = webapis productinfo iswallmodel ; console log value ; } catch error { console log " error code = " + error code ; } getlocalset retrieves the local set information that is set in the device domstring getlocalset ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring localset value exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getlocalset ; console log " localset value = " + value ; } catch error { console log " error code = " + error code ; } getsystemconfig retrieves the value for the specified system configuration key, such as service country code any getsystemconfig productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key return value any system configuration value only for config_key_aot_support key the return type is boolean, the return type for other case is domstring exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsystemconfig webapis productinfo productinfoconfigkey config_key_data_service ; console log "systemconfig value = " + value ; } catch error { console log " error code = " + error code ; } setsystemconfig sets the value for the specified system configuration key void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key value value to set onsuccess [optional][nullable] callback method to invoke when the system configuration key value is successfully set onerror [optional][nullable] callback method to invoke if an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value if only setsystemconfig can set config_key_data_service or config_key_active_category since plugin version 3 0 with error type notsupportederror, if 'config_key_service_country' is readonly deprecated since plugin version 3 0 with error type notsupportederror, if 'config_key_shoplogo' is readonly deprecated since plugin version 3 0 since 2 3 code example function onsuccess data { console log "systemconfig data = " + data ; } function onerror error { console log "error code " + error code ; } try { webapis productinfo setsystemconfig webapis productinfo productinfoconfigkey config_key_data_service, value, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } addsystemconfigchangelistener registers a system configuration change listener unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key productinfo configuration key listener productinfoconfigchangecallback listener return value unsigned long listener id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid or unchangeable value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo addsystemconfigchangelistener webapis productinfo productinfoconfigkey config_key_data_service, listener ; console log " add listener value = " + value ; } catch error { console log " error code = " + error code ; } removesystemconfigchangelistener unregisters a system configuration change listener void removesystemconfigchangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters listenerid productinfoconfigchangecallback id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { webapis productinfo removesystemconfigchangelistener listenerid ; console log " removedlistener value " ; } catch error { console log " error code = " + error code ; } isuhdamodel checks whether the device supports ultra hd premium features boolean isuhdamodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 3 0 code example try { var value = webapis productinfo isuhdamodel ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } isdisplayrotatorsupported this method check whether display rotator is supported or not boolean isdisplayrotatorsupported ; product tv privilege n return value boolean true if display rotator is supported, else false since 5 5 code example var value = webapis productinfo isdisplayrotatorsupported ; console log "display rotator is supported = " + value ; getlicensedvendor this method get an actual manufacturer's information domstring getlicensedvendor ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring actual manufacturer information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { var value = webapis productinfo getlicensedvendor ; console log " getlicensedvendor value = " + value ; } catch error { console log " error code = " + error code ; } isoledpanelsupported checks whether oledpanel is supported boolean isoledpanelsupported ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 8 0 code example try { var value = webapis productinfo isoledpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } 1 3 productinfoconfigchangecallback defines the product info configuration change callback [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; methods onchange callback method for product info configuration changes void onchange productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key key of each productinfo config since 2 3 code example var onchange = function key { console log " changed key is = " + key ; } 1 4 productinfoconfigkey defines constants for product info configuration keys [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; since 2 3 constants config_key_data_service data service configuration, it can be setted as string ype with numbers since 2 3 config_key_service_country service country, readonly since 2 3 1 5 productinfonoglass3dsupport defines constants for glasses-free 3d support [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; since 2 3 constants no_glass_3d_not_supported glasses-free 3d is not supported since 2 3 no_glass_3d_supported glasses-free 3d is supported since 2 3 1 6 productinfosiservertype defines constants for infolink server types [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; since 2 3 constants si_type_operatiing_server operating since 2 3 si_type_development_server development since 2 3 si_type_developing_server developing since 2 3 2 full webidl module productinfo { [nointerfaceobject] interface productinfomanagerobject { readonly attribute productinfomanager productinfo; }; webapi implements productinfomanagerobject; [nointerfaceobject] interface productinfomanager { attribute productinfoconfigkey productinfoconfigkey; attribute productinfonoglass3dsupport productinfonoglass3dsupport; attribute productinfosiservertype productinfosiservertype; domstring getversion ; domstring getfirmware ; domstring getduid ; domstring getmodelcode ; domstring getmodel ; domstring getlicensedbrand ; productinfosiservertype getsmarttvservertype ; domstring getsmarttvserverversion ; boolean isudpanelsupported ; boolean is8kpanelsupported ; domstring getrealmodel ; boolean iswallmodel ; domstring getlocalset ; any getsystemconfig productinfoconfigkey key ; void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; void removesystemconfigchangelistener unsigned long listenerid ; boolean isuhdamodel ; boolean isdisplayrotatorsupported ; domstring getlicensedvendor ; boolean isoledpanelsupported ; }; [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; };
Develop Smart Signage
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } getfirmware retrieves the firmware information domstring getfirmware ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring firmware version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getfirmware ; console log " firmware value = " + value ; } catch error { console log " error code = " + error code ; } getduid retrieves the duid from support > about tv > unique id domstring getduid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring duid exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getduid ; console log " duid value = " + value ; } catch error { console log " error code = " + error code ; } getmodelcode retrieves the model code, such as "15_hawkp" domstring getmodelcode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model code exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodelcode ; console log " modelcode value = " + value ; } catch error { console log " error code = " + error code ; } getmodel retrieves the model name, such as "ujs9500" domstring getmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getmodel ; console log " model value = " + value ; } catch error { console log " error code = " + error code ; } getlicensedbrand retrieves the brand information, valid only for licensing product domstring getlicensedbrand ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring brand information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type notsupportederror, if this api is called for "samsung" products since 7 0 code example try { var value = webapis productinfo getlicensedbrand ; console log " brand information value = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvservertype retrieves the infolink server type productinfosiservertype getsmarttvservertype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value productinfosiservertype infolink server type exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvservertype ; console log " smart tv server type = " + value ; } catch error { console log " error code = " + error code ; } getsmarttvserverversion retrieves the infolink server version, such as "t-infolink2014-1002" domstring getsmarttvserverversion ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring infolink server version exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsmarttvserverversion ; console log " smart tv server version = " + value ; } catch error { console log " error code = " + error code ; } isudpanelsupported checks whether udpanel is supported boolean isudpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo isudpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } is8kpanelsupported checks whether 8k panel is supported boolean is8kpanelsupported ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 4 0 code example try { var value = webapis productinfo is8kpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } getrealmodel retrieves the full model name, such as un65js9500 domstring getrealmodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring model name exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getrealmodel ; console log " modelname value = " + value ; } catch error { console log " error code = " + error code ; } iswallmodel checks whether the product model is wall boolean iswallmodel ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true wall model false not wall model exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 5 0 code example try { var value = webapis productinfo iswallmodel ; console log value ; } catch error { console log " error code = " + error code ; } getlocalset retrieves the local set information that is set in the device domstring getlocalset ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring localset value exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getlocalset ; console log " localset value = " + value ; } catch error { console log " error code = " + error code ; } getsystemconfig retrieves the value for the specified system configuration key, such as service country code any getsystemconfig productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key return value any system configuration value only for config_key_aot_support key the return type is boolean, the return type for other case is domstring exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo getsystemconfig webapis productinfo productinfoconfigkey config_key_data_service ; console log "systemconfig value = " + value ; } catch error { console log " error code = " + error code ; } setsystemconfig sets the value for the specified system configuration key void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key product info configuration key value value to set onsuccess [optional][nullable] callback method to invoke when the system configuration key value is successfully set onerror [optional][nullable] callback method to invoke if an error has occurred securityerror, if the application does not have the privilege to call this method exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value if only setsystemconfig can set config_key_data_service or config_key_active_category since plugin version 3 0 with error type notsupportederror, if 'config_key_service_country' is readonly deprecated since plugin version 3 0 with error type notsupportederror, if 'config_key_shoplogo' is readonly deprecated since plugin version 3 0 since 2 3 code example function onsuccess data { console log "systemconfig data = " + data ; } function onerror error { console log "error code " + error code ; } try { webapis productinfo setsystemconfig webapis productinfo productinfoconfigkey config_key_data_service, value, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } addsystemconfigchangelistener registers a system configuration change listener unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key productinfo configuration key listener productinfoconfigchangecallback listener return value unsigned long listener id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid or unchangeable value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { var value = webapis productinfo addsystemconfigchangelistener webapis productinfo productinfoconfigkey config_key_data_service, listener ; console log " add listener value = " + value ; } catch error { console log " error code = " + error code ; } removesystemconfigchangelistener unregisters a system configuration change listener void removesystemconfigchangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters listenerid productinfoconfigchangecallback id exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if any of the input parameters contain an invalid value since plugin version 3 0 with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example try { webapis productinfo removesystemconfigchangelistener listenerid ; console log " removedlistener value " ; } catch error { console log " error code = " + error code ; } isuhdamodel checks whether the device supports ultra hd premium features boolean isuhdamodel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 3 0 code example try { var value = webapis productinfo isuhdamodel ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } isdisplayrotatorsupported this method check whether display rotator is supported or not boolean isdisplayrotatorsupported ; product tv privilege n return value boolean true if display rotator is supported, else false since 5 5 code example var value = webapis productinfo isdisplayrotatorsupported ; console log "display rotator is supported = " + value ; getlicensedvendor this method get an actual manufacturer's information domstring getlicensedvendor ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value domstring actual manufacturer information exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 6 0 code example try { var value = webapis productinfo getlicensedvendor ; console log " getlicensedvendor value = " + value ; } catch error { console log " error code = " + error code ; } isoledpanelsupported checks whether oledpanel is supported boolean isoledpanelsupported ; product tv, b2b privilege level public privilege http //developer samsung com/privilege/productinfo return value boolean boolean value true supported false not supported exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 8 0 code example try { var value = webapis productinfo isoledpanelsupported ; console log " support = " + value ; } catch error { console log " error code = " + error code ; } 1 3 productinfoconfigchangecallback defines the product info configuration change callback [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; methods onchange callback method for product info configuration changes void onchange productinfoconfigkey key ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/productinfo parameters key key of each productinfo config since 2 3 code example var onchange = function key { console log " changed key is = " + key ; } 1 4 productinfoconfigkey defines constants for product info configuration keys [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; since 2 3 constants config_key_data_service data service configuration, it can be setted as string ype with numbers since 2 3 config_key_service_country service country, readonly since 2 3 1 5 productinfonoglass3dsupport defines constants for glasses-free 3d support [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; since 2 3 constants no_glass_3d_not_supported glasses-free 3d is not supported since 2 3 no_glass_3d_supported glasses-free 3d is supported since 2 3 1 6 productinfosiservertype defines constants for infolink server types [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; since 2 3 constants si_type_operatiing_server operating since 2 3 si_type_development_server development since 2 3 si_type_developing_server developing since 2 3 2 full webidl module productinfo { [nointerfaceobject] interface productinfomanagerobject { readonly attribute productinfomanager productinfo; }; webapi implements productinfomanagerobject; [nointerfaceobject] interface productinfomanager { attribute productinfoconfigkey productinfoconfigkey; attribute productinfonoglass3dsupport productinfonoglass3dsupport; attribute productinfosiservertype productinfosiservertype; domstring getversion ; domstring getfirmware ; domstring getduid ; domstring getmodelcode ; domstring getmodel ; domstring getlicensedbrand ; productinfosiservertype getsmarttvservertype ; domstring getsmarttvserverversion ; boolean isudpanelsupported ; boolean is8kpanelsupported ; domstring getrealmodel ; boolean iswallmodel ; domstring getlocalset ; any getsystemconfig productinfoconfigkey key ; void setsystemconfig productinfoconfigkey key, domstring value, optional successcallback? onsuccess, optional errorcallback? onerror ; unsigned long addsystemconfigchangelistener productinfoconfigkey key, productinfoconfigchangecallback listener ; void removesystemconfigchangelistener unsigned long listenerid ; boolean isuhdamodel ; boolean isdisplayrotatorsupported ; domstring getlicensedvendor ; boolean isoledpanelsupported ; }; [callback = functiononly, nointerfaceobject] interface productinfoconfigchangecallback { void onchange productinfoconfigkey key ; }; [nointerfaceobject] interface productinfoconfigkey { const unsigned long config_key_data_service = 0; const unsigned long config_key_service_country = 1; }; [nointerfaceobject] interface productinfonoglass3dsupport { const unsigned long no_glass_3d_not_supported = 0; const unsigned long no_glass_3d_supported = 1; }; [nointerfaceobject] interface productinfosiservertype { const unsigned long si_type_operatiing_server = 0; const unsigned long si_type_development_server = 1; const unsigned long si_type_developing_server = 2; }; };
Develop Smart TV
apiconsole log "getversion exception [" + e code + "] name " + e name + " message " + e message ; } if null != version { console log "[getversion] version " + version ; } isconnectedtogateway checks whether the device is connected to a network gateway boolean isconnectedtogateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value boolean boolean value true gateway connected false gateway is not connected exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var gatewaystatus = null; try { gatewaystatus = webapis network isconnectedtogateway ; } catch e { console error "isconnectedtogateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gatewaystatus { console log "[isconnectedtogateway] gatewaystatus " + gatewaystatus ; } getipmode retrieves the device's ip configuration mode networkipmode getipmode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkipmode unsigned long network ip mode "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var ipmode = null; var retval = null; try { retval = webapis network getipmode ; } catch e { console log "getipmode exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkipmode static ipmode = "static"; break; case webapis network networkipmode dynamic ipmode = "dynamic"; break; case webapis network networkipmode auto ipmode = "auto"; break; case webapis network networkipmode fixed ipmode = "fixed"; break; case webapis network networkipmode none ipmode = "none"; break; case webapis network networkipmode unknown ipmode = "unknown"; break; default ipmode = "error"; } console log "[getipmode] ipmode " + ipmode ; } setipmode configures device's ip mode void setipmode networkipmode ipmode ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ipmode ip mode to be set "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setipmode webapis network networkipmode static ; } catch e { console error "setipmode exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setipmode] success" ; } getsubnetmask retrieves the device's configured subnet mask address domstring getsubnetmask ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring subnet mask address for the currently-configured network example 255 255 255 0 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var netmask = null; try { netmask = webapis network getsubnetmask ; } catch e { console log "getsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; } if null != netmask { console log "[getsubnetmask] netmask " + netmask ; } setsubnetmask configures device's subnet mask void setsubnetmask domstring subnet ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters subnet subnet mask to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setsubnetmask "255 255 255 0" ; } catch e { console error "setsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsubnetmask] success" ; } getgateway retrieves the device's configured gateway address domstring getgateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring gateway address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var gateway = null; try { gateway = webapis network getgateway ; } catch e { console log "getgateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gateway { console log "[getgateway] gateway " + gateway ; } setgateway configures device's gateway address void setgateway domstring gateway ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters gateway gateway to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setgateway "107 109 92 1" ; } catch e { console error "setgateway exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setgateway] success" ; } getmac retrieves the network device's mac address domstring getmac ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring mac address for the currently-configured network example 50 b7 a3 c2 96 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var mac = null; try { mac = webapis network getmac ; } catch e { console log "getmac exception [" + e code + "] name " + e name + " message " + e message ; } if null != mac { console log "[getmac] mac " + mac ; } getdns retrieves the device's configured dns address domstring getdns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring dns address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var dns = null; try { dns = webapis network getdns ; } catch e { console log "getdns exception [" + e code + "] name " + e name + " message " + e message ; } if null != dns { console log "[getdns] dns " + dns ; } setdns configures device's dns address void setdns domstring dns ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters dns dns to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setdns "8 8 8 8" ; } catch e { console error "setdns exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setdns] success" ; } getip retrieves the device's configured ip address domstring getip ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring ip address for the currently-configured network example 192 168 0 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var ip = null; try { ip = webapis network getip ; } catch e { console log "getip exception [" + e code + "] name " + e name + " message " + e message ; } if null != ip { console log "[getip] ip " + ip ; } setip configures device's ip address void setip domstring ip ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ip ip to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setip "107 109 92 9" ; } catch e { console error "setip exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setip] success" ; } getproxyserverinfo retrieves the device's configured proxy server info domstring getproxyserverinfo ; product b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring proxy server info exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var proxy = null; try { proxy = network getproxyserverinfo ; } catch e { console log "getproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; } if null != proxy { console log "[getproxyserverinfo] proxy " + proxy ; } setproxyserverinfo configures device's proxy server info void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters id id to be set pwd password to be set url url to be set port port to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setproxyserverinfo "id", "pwd", "10 20 30 40", "9998" ; } catch e { console error "setproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setproxyserverinfo] success" ; } gettvname retrieves the device's configured name when device is connected to a network domstring gettvname ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring device name for any connected network example tizen_device exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 4 0 code example var tvname = null; try { tvname = webapis network gettvname ; } catch e { console log "gettvname exception [" + e code + "] mname " + e name + " message " + e message ; } if null != tvname { console log "[gettvname] tvname " + tvname ; } getactiveconnectiontype retrieves the device's currently-active connection type networkactiveconnectiontype getactiveconnectiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkactiveconnectiontype unsigned long currently-active network connection type "disconnected" 0 "wifi" 1 "cellular" 2 "ethernet" 3 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var conntype = null; var retval = null; try { retval = webapis network getactiveconnectiontype ; } catch e { console error "getactiveconnectiontype exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkactiveconnectiontype disconnected conntype = "disconnected"; break; case webapis network networkactiveconnectiontype wifi conntype = "wifi"; break; case webapis network networkactiveconnectiontype cellular conntype = "cellular"; break; case webapis network networkactiveconnectiontype ethernet conntype = "ethernet"; break; default conntype = "error"; } console log "[getactiveconnectiontype] active connection type " + conntype ; } addnetworkstatechangelistener registers an asynchronous event listener unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listener callback method for example listenerid = network addnetworkstatechangelistener onchange ; return value unsigned long unsigned long application async listener id exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type since 2 3 code example var onchange = function data { console log "[networkstatechangedcallback] data " + data + " changed" ; } try { listenerid = webapis network addnetworkstatechangelistener onchange ; } catch e { console log "addnetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; } if listenerid > -1 { console log "addnetworkstatechangelistener success listener id [" + listenerid + "] " ; } removenetworkstatechangelistener unregisters an asynchronous event listener void removenetworkstatechangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listenerid listenerid to be removed exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if the listenerid value is not the same as the value generated by addnetworkstatechangelistener since plugin version 3 0 since 2 3 code example try { console log "begin removenetworkstatechangelistener listenerid " + listenerid ; webapis network removenetworkstatechangelistener listenerid ; } catch e { console log "removenetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; return; } console log "removenetworkstatechangelistener success" ; getwifissid retrieves the wi-fi network ssid works only when the active connection type is wi-fi domstring getwifissid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring wi-fi network ssid example strawbarry exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifissid = null; try { wifissid = webapis network getwifissid ; } catch e { console log "getwifissid exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifissid { console log "[getwifissid] wifissid " + wifissid ; } getwifisignalstrengthlevel retrieves the wi-fi signal strength works only when the active connection type is wi-fi long getwifisignalstrengthlevel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long long signal strength level valid values are 1 to 5 signal strength is strongest when the value is 5 8dbm 8 ~ -77dbm 7 ~ -66dbm 6 ~ -55dbm 5dbm exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisignalstrengthlevel = null; try { wifisignalstrengthlevel = webapis network getwifisignalstrengthlevel ; } catch e { console log "getwifisignalstrengthlevel exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisignalstrengthlevel { console log "[getwifisignalstrengthlevel] wifisignalstrengthlevel " + wifisignalstrengthlevel ; } getwifisecuritymode retrieves the wi-fi security mode works only when the active connection type is wi-fi networkwifisecuritymode getwifisecuritymode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifisecuritymode unsigned long wi-fi security mode "wep" 1 "wpa_psk" 2 "wpa2_psk" 3 "eap" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisecuritymode = null; try { wifisecuritymode = webapis network getwifisecuritymode ; } catch e { console log "getwifisecuritymode exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisecuritymode { console log "[getwifisecuritymode] wifisecuritymode " + wifisecuritymode ; } getwifiencryptiontype retrieves the wi-fi encryption type works only when the active connection type is wi-fi networkwifiencryptiontype getwifiencryptiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifiencryptiontype unsigned long wi-fi encryption type "wep" 1 "tkip" 2 "aes" 3 "tkip_aes_mixed" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifiencryptiontype = null; try { wifiencryptiontype = webapis network getwifiencryptiontype ; } catch e { console log "getwifiencryptiontype exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifiencryptiontype { console log "[getwifiencryptiontype] wifiencryptiontype " + wifiencryptiontype ; } getsecondarydns retrieves the device's configured secondary dns address domstring getsecondarydns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring secondary dns address example 192 168 0 100 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var secondarydns = null; try { secondarydns = webapis network getsecondarydns ; } catch e { console error "getsecondarydns exception [" + e code + "] name " + e name + " message " + e message ; } if null != secondarydns { console log "[getsecondarydns] secondarydns " + secondarydns ; } setdhcpoption60field sets the dhcp option 60 vendor string works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void setdhcpoption60field domstring vendorname ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 parameters vendorname dhcp option 60 vendor name string exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 with error type typemismatcherror, if an input parameter is not compatible with its expected type since plugin version 3 0 since 2 3 code example try { webapis network setdhcpoption60field "cisco" ; } catch e { console error "setdhcpoption60field exception [" + e code + "] message " + e message ; } console log "[setdhcpoption60field] dhcpoption60field success " ; removedhcpoption60field sets the dhcp option 60 vendor string to the default value, "udhcpc1 21 1" works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void removedhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example try { webapis network removedhcpoption60field ; } catch e { console error "removedhcpoption60field exception [" + e code + "] message " + e message ; } console log "[removedhcpoption60field] dhcpoption60field success " ; getcurrentdhcpoption60field retrieves the dhcp option 60 vendor string works only when the active connection type is wired domstring getcurrentdhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor-specific string default value is "default" example if setdhcpoption60field = "cisco" then getcurrentdhcpoption60field = "cisco" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network getcurrentdhcpoption60field ; } catch e { console error "getcurrentdhcpoption60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[getcurrentdhcpoption60field] dhcpoption60field " + dhcpoption60field ; } checkcurrentipwith60field retrieves the dhcp option 60 vendor string currently used by udhcp works only when the active connection type is wired domstring checkcurrentipwith60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor string example if udhcpc is running with the default string "udhcpc1 21 1", after calling setdhcpoption60field = "cisco", checkcurrentipwith60field= "udhcpc1 21 1" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network checkcurrentipwith60field ; } catch e { console error "checkcurrentipwith60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[checkcurrentipwith60field] dhcpoption60field " + dhcpoption60field ; } enablesoftap this method enables softap in hotel tv void enablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network enablesoftap ; } catch e { console error "enable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[enablesoftap] success" ; } disablesoftap this method disables softap in hotel tv void disablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network disablesoftap ; } catch e { console error "disable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[disablesoftap] success" ; } issoftapenabled this method gets the softap status in hotel tv whether it is enabled or not boolean issoftapenabled ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value boolean boolean it returns true if softap is enabled, false if softap is disabled exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var status = null; try { status = webapis network issoftapenabled ; } catch e { console error "issoftapenabled exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if null != status { console log "[issoftapenabled] status " + status ; } getsoftapssid this method returns the softap ssid domstring getsoftapssid ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap ssid from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var ssid = null; try { ssid = webapis network getsoftapssid ; } catch e { console error "getsoftapssid exception [" + e code + "] name " + e name + " message " + e message ; } if null != ssid { console log "[getsoftapssid] ssid " + ssid ; } setsoftapchannel this method sets the softap channel to specified channel void setsoftapchannel long channel ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters channel softap channel to be set exceptions webapiexception with error type typemismatcherror, if invalid long type passed for 'channel' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapchannel 5 ; } catch e { console error "setsoftapchannel exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapchannel] success" ; } getsoftapsecuritykey this method returns the softap security key domstring getsoftapsecuritykey ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap security key from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var key = null; try { key = webapis network getsoftapsecuritykey ; } catch e { console error "getsoftapsecuritykey exception [" + e code + "] name " + e name + " message " + e message ; } if null != key { console log "[getsoftapsecuritykey] key " + key ; } setsoftapsignalstrength this method sets softap signal strength to a specific value void setsoftapsignalstrength unsigned long power ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters power signal strength 0-100 exceptions webapiexception with error type typemismatcherror, if invalid unsigned long type passed for 'power' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 with error type invalidvalueserror, if power is out of range since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapsignalstrength 100 ; } catch e { console error "setsoftapsignalstrength exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapsignalstrength] success" ; } seteapcafilepath set the peap certification file path for peap base ap connection void seteapcafilepath domstring path ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters path peap certification file path exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'path' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteapcafilepath "/opt/usr/home/owner/share/root_test/ca der" ; } catch e { console error "seteapcafilepath exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteapcafilepath] success" ; } seteappassphrase sets the username and password void seteappassphrase domstring name, domstring password ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters name to be set password to be set exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'name' and 'password' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteappassphrase "testing11", "password11" ; } catch e { console error "seteappassphrase exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteappassphrase] success" ; } getwififrequency retrieves the wi-fi network frequency works only when the active connection type is wi-fi long getwififrequency ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long wi-fi network frequency mhz exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since 6 0 code example var wififrequency = null; try { wififrequency = webapis network getwififrequency ; } catch e { console log "getwififrequency exception [" + e code + "] name " + e name + " message " + e message ; } if null != wififrequency { console log "[getwififrequency] wififrequency " + wififrequency ; } 1 3 networkstatechangedcallback defines a listener for gateway connection state change notifications [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; methods onchange callback method for gateway connection state change notifications void onchange networkstate state ; privilege level public privilege http //developer samsung com/privilege/network public parameters state connection state exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 3 0 code example var gatewaystatus =null; var onchange = function data { if data == webapis network networkstate gateway_connected { gatewaystatus ="gateway_connected"; } else if data == webapis network networkstate gateway_disconnected { gatewaystatus ="gateway_disconnected"; } else{ gatewaystatus ="status unknown"; } console log "[networkstatechangedcallback] data " + data +" "+ gatewaystatus ; } 1 4 networkipmode defines constants for network ip modes [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; constants none no network ip mode configured static connected to wired or wireless ipv4 network through static ip configuration dynamic connected to wired or wireless ipv6 network through dynamic ip configuration auto dhcp connected to wired or wireless ipv4 network through automatic ip configuration fixed connected to cellular network through fixed ip configuration unknown no wired or wireless connection 1 5 networkactiveconnectiontype defines constants for network connection types [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; constants disconnected no network configured wifi connected to a wi-fi network cellular connected to a cellular network ethernet connected to an ethernet network 1 6 networkstate defines constants for network states [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; constants internet_connected internet connected lan_cable_attached lan cable connected lan_cable_detached lan cable disconnected lan_cable_state_unknown lan cable connection state unknown gateway_connected gateway connected gateway_disconnected gateway disconnected wifi_module_state_attached wi-fi module connected wifi_module_state_detached wi-fi module disconnected wifi_module_state_unknown wi-fi module connection state unknown internet_disconnected internet disconnected 1 7 networkwifisecuritymode defines constants for wi-fi network security modes [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep security mode wpa_psk psk security mode wpa2_psk wpa2_psk security mode eap eap security mode none open security mode unknown security mode unknown 1 8 networkwifiencryptiontype defines constants for wi-fi network encryption types [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep encryption tkip tkip encryption aes aes encryption tkip_aes_mixed tkip_aes_mixed encryption none no encryption unknown encryption type unknown 2 full webidl module network { [nointerfaceobject] interface networkmanagerobject { readonly attribute networkmanager network; }; webapi implements networkmanagerobject; [nointerfaceobject] interface networkmanager { attribute networkactiveconnectiontype networkactiveconnectiontype; attribute networkipmode networkipmode; attribute networkstate networkstate; attribute networkwifisecuritymode networkwifisecuritymode; attribute networkwifiencryptiontype networkwifiencryptiontype; domstring getversion ; boolean isconnectedtogateway ; networkipmode getipmode ; void setipmode networkipmode ipmode ; domstring getsubnetmask ; void setsubnetmask domstring subnet ; domstring getgateway ; void setgateway domstring gateway ; domstring getmac ; domstring getdns ; void setdns domstring dns ; domstring getip ; void setip domstring ip ; domstring getproxyserverinfo ; void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; domstring gettvname ; networkactiveconnectiontype getactiveconnectiontype ; unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; void removenetworkstatechangelistener unsigned long listenerid ; domstring getwifissid ; long getwifisignalstrengthlevel ; networkwifisecuritymode getwifisecuritymode ; networkwifiencryptiontype getwifiencryptiontype ; domstring getsecondarydns ; void setdhcpoption60field domstring vendorname ; void removedhcpoption60field ; domstring getcurrentdhcpoption60field ; domstring checkcurrentipwith60field ; void enablesoftap ; void disablesoftap ; boolean issoftapenabled ; domstring getsoftapssid ; void setsoftapchannel long channel ; domstring getsoftapsecuritykey ; void setsoftapsignalstrength unsigned long power ; void seteapcafilepath domstring path ; void seteappassphrase domstring name, domstring password ; long getwififrequency ; }; [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; };
Develop Smart Hospitality Display
apiconsole log "getversion exception [" + e code + "] name " + e name + " message " + e message ; } if null != version { console log "[getversion] version " + version ; } isconnectedtogateway checks whether the device is connected to a network gateway boolean isconnectedtogateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value boolean boolean value true gateway connected false gateway is not connected exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var gatewaystatus = null; try { gatewaystatus = webapis network isconnectedtogateway ; } catch e { console error "isconnectedtogateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gatewaystatus { console log "[isconnectedtogateway] gatewaystatus " + gatewaystatus ; } getipmode retrieves the device's ip configuration mode networkipmode getipmode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkipmode unsigned long network ip mode "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var ipmode = null; var retval = null; try { retval = webapis network getipmode ; } catch e { console log "getipmode exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkipmode static ipmode = "static"; break; case webapis network networkipmode dynamic ipmode = "dynamic"; break; case webapis network networkipmode auto ipmode = "auto"; break; case webapis network networkipmode fixed ipmode = "fixed"; break; case webapis network networkipmode none ipmode = "none"; break; case webapis network networkipmode unknown ipmode = "unknown"; break; default ipmode = "error"; } console log "[getipmode] ipmode " + ipmode ; } setipmode configures device's ip mode void setipmode networkipmode ipmode ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ipmode ip mode to be set "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setipmode webapis network networkipmode static ; } catch e { console error "setipmode exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setipmode] success" ; } getsubnetmask retrieves the device's configured subnet mask address domstring getsubnetmask ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring subnet mask address for the currently-configured network example 255 255 255 0 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var netmask = null; try { netmask = webapis network getsubnetmask ; } catch e { console log "getsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; } if null != netmask { console log "[getsubnetmask] netmask " + netmask ; } setsubnetmask configures device's subnet mask void setsubnetmask domstring subnet ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters subnet subnet mask to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setsubnetmask "255 255 255 0" ; } catch e { console error "setsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsubnetmask] success" ; } getgateway retrieves the device's configured gateway address domstring getgateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring gateway address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var gateway = null; try { gateway = webapis network getgateway ; } catch e { console log "getgateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gateway { console log "[getgateway] gateway " + gateway ; } setgateway configures device's gateway address void setgateway domstring gateway ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters gateway gateway to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setgateway "107 109 92 1" ; } catch e { console error "setgateway exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setgateway] success" ; } getmac retrieves the network device's mac address domstring getmac ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring mac address for the currently-configured network example 50 b7 a3 c2 96 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var mac = null; try { mac = webapis network getmac ; } catch e { console log "getmac exception [" + e code + "] name " + e name + " message " + e message ; } if null != mac { console log "[getmac] mac " + mac ; } getdns retrieves the device's configured dns address domstring getdns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring dns address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var dns = null; try { dns = webapis network getdns ; } catch e { console log "getdns exception [" + e code + "] name " + e name + " message " + e message ; } if null != dns { console log "[getdns] dns " + dns ; } setdns configures device's dns address void setdns domstring dns ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters dns dns to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setdns "8 8 8 8" ; } catch e { console error "setdns exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setdns] success" ; } getip retrieves the device's configured ip address domstring getip ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring ip address for the currently-configured network example 192 168 0 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var ip = null; try { ip = webapis network getip ; } catch e { console log "getip exception [" + e code + "] name " + e name + " message " + e message ; } if null != ip { console log "[getip] ip " + ip ; } setip configures device's ip address void setip domstring ip ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ip ip to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setip "107 109 92 9" ; } catch e { console error "setip exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setip] success" ; } getproxyserverinfo retrieves the device's configured proxy server info domstring getproxyserverinfo ; product b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring proxy server info exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var proxy = null; try { proxy = network getproxyserverinfo ; } catch e { console log "getproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; } if null != proxy { console log "[getproxyserverinfo] proxy " + proxy ; } setproxyserverinfo configures device's proxy server info void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters id id to be set pwd password to be set url url to be set port port to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setproxyserverinfo "id", "pwd", "10 20 30 40", "9998" ; } catch e { console error "setproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setproxyserverinfo] success" ; } gettvname retrieves the device's configured name when device is connected to a network domstring gettvname ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring device name for any connected network example tizen_device exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 4 0 code example var tvname = null; try { tvname = webapis network gettvname ; } catch e { console log "gettvname exception [" + e code + "] mname " + e name + " message " + e message ; } if null != tvname { console log "[gettvname] tvname " + tvname ; } getactiveconnectiontype retrieves the device's currently-active connection type networkactiveconnectiontype getactiveconnectiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkactiveconnectiontype unsigned long currently-active network connection type "disconnected" 0 "wifi" 1 "cellular" 2 "ethernet" 3 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var conntype = null; var retval = null; try { retval = webapis network getactiveconnectiontype ; } catch e { console error "getactiveconnectiontype exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkactiveconnectiontype disconnected conntype = "disconnected"; break; case webapis network networkactiveconnectiontype wifi conntype = "wifi"; break; case webapis network networkactiveconnectiontype cellular conntype = "cellular"; break; case webapis network networkactiveconnectiontype ethernet conntype = "ethernet"; break; default conntype = "error"; } console log "[getactiveconnectiontype] active connection type " + conntype ; } addnetworkstatechangelistener registers an asynchronous event listener unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listener callback method for example listenerid = network addnetworkstatechangelistener onchange ; return value unsigned long unsigned long application async listener id exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type since 2 3 code example var onchange = function data { console log "[networkstatechangedcallback] data " + data + " changed" ; } try { listenerid = webapis network addnetworkstatechangelistener onchange ; } catch e { console log "addnetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; } if listenerid > -1 { console log "addnetworkstatechangelistener success listener id [" + listenerid + "] " ; } removenetworkstatechangelistener unregisters an asynchronous event listener void removenetworkstatechangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listenerid listenerid to be removed exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if the listenerid value is not the same as the value generated by addnetworkstatechangelistener since plugin version 3 0 since 2 3 code example try { console log "begin removenetworkstatechangelistener listenerid " + listenerid ; webapis network removenetworkstatechangelistener listenerid ; } catch e { console log "removenetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; return; } console log "removenetworkstatechangelistener success" ; getwifissid retrieves the wi-fi network ssid works only when the active connection type is wi-fi domstring getwifissid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring wi-fi network ssid example strawbarry exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifissid = null; try { wifissid = webapis network getwifissid ; } catch e { console log "getwifissid exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifissid { console log "[getwifissid] wifissid " + wifissid ; } getwifisignalstrengthlevel retrieves the wi-fi signal strength works only when the active connection type is wi-fi long getwifisignalstrengthlevel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long long signal strength level valid values are 1 to 5 signal strength is strongest when the value is 5 8dbm 8 ~ -77dbm 7 ~ -66dbm 6 ~ -55dbm 5dbm exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisignalstrengthlevel = null; try { wifisignalstrengthlevel = webapis network getwifisignalstrengthlevel ; } catch e { console log "getwifisignalstrengthlevel exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisignalstrengthlevel { console log "[getwifisignalstrengthlevel] wifisignalstrengthlevel " + wifisignalstrengthlevel ; } getwifisecuritymode retrieves the wi-fi security mode works only when the active connection type is wi-fi networkwifisecuritymode getwifisecuritymode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifisecuritymode unsigned long wi-fi security mode "wep" 1 "wpa_psk" 2 "wpa2_psk" 3 "eap" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisecuritymode = null; try { wifisecuritymode = webapis network getwifisecuritymode ; } catch e { console log "getwifisecuritymode exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisecuritymode { console log "[getwifisecuritymode] wifisecuritymode " + wifisecuritymode ; } getwifiencryptiontype retrieves the wi-fi encryption type works only when the active connection type is wi-fi networkwifiencryptiontype getwifiencryptiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifiencryptiontype unsigned long wi-fi encryption type "wep" 1 "tkip" 2 "aes" 3 "tkip_aes_mixed" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifiencryptiontype = null; try { wifiencryptiontype = webapis network getwifiencryptiontype ; } catch e { console log "getwifiencryptiontype exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifiencryptiontype { console log "[getwifiencryptiontype] wifiencryptiontype " + wifiencryptiontype ; } getsecondarydns retrieves the device's configured secondary dns address domstring getsecondarydns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring secondary dns address example 192 168 0 100 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var secondarydns = null; try { secondarydns = webapis network getsecondarydns ; } catch e { console error "getsecondarydns exception [" + e code + "] name " + e name + " message " + e message ; } if null != secondarydns { console log "[getsecondarydns] secondarydns " + secondarydns ; } setdhcpoption60field sets the dhcp option 60 vendor string works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void setdhcpoption60field domstring vendorname ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 parameters vendorname dhcp option 60 vendor name string exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 with error type typemismatcherror, if an input parameter is not compatible with its expected type since plugin version 3 0 since 2 3 code example try { webapis network setdhcpoption60field "cisco" ; } catch e { console error "setdhcpoption60field exception [" + e code + "] message " + e message ; } console log "[setdhcpoption60field] dhcpoption60field success " ; removedhcpoption60field sets the dhcp option 60 vendor string to the default value, "udhcpc1 21 1" works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void removedhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example try { webapis network removedhcpoption60field ; } catch e { console error "removedhcpoption60field exception [" + e code + "] message " + e message ; } console log "[removedhcpoption60field] dhcpoption60field success " ; getcurrentdhcpoption60field retrieves the dhcp option 60 vendor string works only when the active connection type is wired domstring getcurrentdhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor-specific string default value is "default" example if setdhcpoption60field = "cisco" then getcurrentdhcpoption60field = "cisco" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network getcurrentdhcpoption60field ; } catch e { console error "getcurrentdhcpoption60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[getcurrentdhcpoption60field] dhcpoption60field " + dhcpoption60field ; } checkcurrentipwith60field retrieves the dhcp option 60 vendor string currently used by udhcp works only when the active connection type is wired domstring checkcurrentipwith60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor string example if udhcpc is running with the default string "udhcpc1 21 1", after calling setdhcpoption60field = "cisco", checkcurrentipwith60field= "udhcpc1 21 1" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network checkcurrentipwith60field ; } catch e { console error "checkcurrentipwith60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[checkcurrentipwith60field] dhcpoption60field " + dhcpoption60field ; } enablesoftap this method enables softap in hotel tv void enablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network enablesoftap ; } catch e { console error "enable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[enablesoftap] success" ; } disablesoftap this method disables softap in hotel tv void disablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network disablesoftap ; } catch e { console error "disable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[disablesoftap] success" ; } issoftapenabled this method gets the softap status in hotel tv whether it is enabled or not boolean issoftapenabled ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value boolean boolean it returns true if softap is enabled, false if softap is disabled exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var status = null; try { status = webapis network issoftapenabled ; } catch e { console error "issoftapenabled exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if null != status { console log "[issoftapenabled] status " + status ; } getsoftapssid this method returns the softap ssid domstring getsoftapssid ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap ssid from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var ssid = null; try { ssid = webapis network getsoftapssid ; } catch e { console error "getsoftapssid exception [" + e code + "] name " + e name + " message " + e message ; } if null != ssid { console log "[getsoftapssid] ssid " + ssid ; } setsoftapchannel this method sets the softap channel to specified channel void setsoftapchannel long channel ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters channel softap channel to be set exceptions webapiexception with error type typemismatcherror, if invalid long type passed for 'channel' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapchannel 5 ; } catch e { console error "setsoftapchannel exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapchannel] success" ; } getsoftapsecuritykey this method returns the softap security key domstring getsoftapsecuritykey ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap security key from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var key = null; try { key = webapis network getsoftapsecuritykey ; } catch e { console error "getsoftapsecuritykey exception [" + e code + "] name " + e name + " message " + e message ; } if null != key { console log "[getsoftapsecuritykey] key " + key ; } setsoftapsignalstrength this method sets softap signal strength to a specific value void setsoftapsignalstrength unsigned long power ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters power signal strength 0-100 exceptions webapiexception with error type typemismatcherror, if invalid unsigned long type passed for 'power' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 with error type invalidvalueserror, if power is out of range since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapsignalstrength 100 ; } catch e { console error "setsoftapsignalstrength exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapsignalstrength] success" ; } seteapcafilepath set the peap certification file path for peap base ap connection void seteapcafilepath domstring path ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters path peap certification file path exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'path' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteapcafilepath "/opt/usr/home/owner/share/root_test/ca der" ; } catch e { console error "seteapcafilepath exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteapcafilepath] success" ; } seteappassphrase sets the username and password void seteappassphrase domstring name, domstring password ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters name to be set password to be set exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'name' and 'password' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteappassphrase "testing11", "password11" ; } catch e { console error "seteappassphrase exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteappassphrase] success" ; } getwififrequency retrieves the wi-fi network frequency works only when the active connection type is wi-fi long getwififrequency ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long wi-fi network frequency mhz exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since 6 0 code example var wififrequency = null; try { wififrequency = webapis network getwififrequency ; } catch e { console log "getwififrequency exception [" + e code + "] name " + e name + " message " + e message ; } if null != wififrequency { console log "[getwififrequency] wififrequency " + wififrequency ; } 1 3 networkstatechangedcallback defines a listener for gateway connection state change notifications [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; methods onchange callback method for gateway connection state change notifications void onchange networkstate state ; privilege level public privilege http //developer samsung com/privilege/network public parameters state connection state exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 3 0 code example var gatewaystatus =null; var onchange = function data { if data == webapis network networkstate gateway_connected { gatewaystatus ="gateway_connected"; } else if data == webapis network networkstate gateway_disconnected { gatewaystatus ="gateway_disconnected"; } else{ gatewaystatus ="status unknown"; } console log "[networkstatechangedcallback] data " + data +" "+ gatewaystatus ; } 1 4 networkipmode defines constants for network ip modes [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; constants none no network ip mode configured static connected to wired or wireless ipv4 network through static ip configuration dynamic connected to wired or wireless ipv6 network through dynamic ip configuration auto dhcp connected to wired or wireless ipv4 network through automatic ip configuration fixed connected to cellular network through fixed ip configuration unknown no wired or wireless connection 1 5 networkactiveconnectiontype defines constants for network connection types [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; constants disconnected no network configured wifi connected to a wi-fi network cellular connected to a cellular network ethernet connected to an ethernet network 1 6 networkstate defines constants for network states [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; constants internet_connected internet connected lan_cable_attached lan cable connected lan_cable_detached lan cable disconnected lan_cable_state_unknown lan cable connection state unknown gateway_connected gateway connected gateway_disconnected gateway disconnected wifi_module_state_attached wi-fi module connected wifi_module_state_detached wi-fi module disconnected wifi_module_state_unknown wi-fi module connection state unknown internet_disconnected internet disconnected 1 7 networkwifisecuritymode defines constants for wi-fi network security modes [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep security mode wpa_psk psk security mode wpa2_psk wpa2_psk security mode eap eap security mode none open security mode unknown security mode unknown 1 8 networkwifiencryptiontype defines constants for wi-fi network encryption types [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep encryption tkip tkip encryption aes aes encryption tkip_aes_mixed tkip_aes_mixed encryption none no encryption unknown encryption type unknown 2 full webidl module network { [nointerfaceobject] interface networkmanagerobject { readonly attribute networkmanager network; }; webapi implements networkmanagerobject; [nointerfaceobject] interface networkmanager { attribute networkactiveconnectiontype networkactiveconnectiontype; attribute networkipmode networkipmode; attribute networkstate networkstate; attribute networkwifisecuritymode networkwifisecuritymode; attribute networkwifiencryptiontype networkwifiencryptiontype; domstring getversion ; boolean isconnectedtogateway ; networkipmode getipmode ; void setipmode networkipmode ipmode ; domstring getsubnetmask ; void setsubnetmask domstring subnet ; domstring getgateway ; void setgateway domstring gateway ; domstring getmac ; domstring getdns ; void setdns domstring dns ; domstring getip ; void setip domstring ip ; domstring getproxyserverinfo ; void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; domstring gettvname ; networkactiveconnectiontype getactiveconnectiontype ; unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; void removenetworkstatechangelistener unsigned long listenerid ; domstring getwifissid ; long getwifisignalstrengthlevel ; networkwifisecuritymode getwifisecuritymode ; networkwifiencryptiontype getwifiencryptiontype ; domstring getsecondarydns ; void setdhcpoption60field domstring vendorname ; void removedhcpoption60field ; domstring getcurrentdhcpoption60field ; domstring checkcurrentipwith60field ; void enablesoftap ; void disablesoftap ; boolean issoftapenabled ; domstring getsoftapssid ; void setsoftapchannel long channel ; domstring getsoftapsecuritykey ; void setsoftapsignalstrength unsigned long power ; void seteapcafilepath domstring path ; void seteappassphrase domstring name, domstring password ; long getwififrequency ; }; [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; };
Develop Smart Signage
apiconsole log "getversion exception [" + e code + "] name " + e name + " message " + e message ; } if null != version { console log "[getversion] version " + version ; } isconnectedtogateway checks whether the device is connected to a network gateway boolean isconnectedtogateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value boolean boolean value true gateway connected false gateway is not connected exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var gatewaystatus = null; try { gatewaystatus = webapis network isconnectedtogateway ; } catch e { console error "isconnectedtogateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gatewaystatus { console log "[isconnectedtogateway] gatewaystatus " + gatewaystatus ; } getipmode retrieves the device's ip configuration mode networkipmode getipmode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkipmode unsigned long network ip mode "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var ipmode = null; var retval = null; try { retval = webapis network getipmode ; } catch e { console log "getipmode exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkipmode static ipmode = "static"; break; case webapis network networkipmode dynamic ipmode = "dynamic"; break; case webapis network networkipmode auto ipmode = "auto"; break; case webapis network networkipmode fixed ipmode = "fixed"; break; case webapis network networkipmode none ipmode = "none"; break; case webapis network networkipmode unknown ipmode = "unknown"; break; default ipmode = "error"; } console log "[getipmode] ipmode " + ipmode ; } setipmode configures device's ip mode void setipmode networkipmode ipmode ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ipmode ip mode to be set "none" 0 "static" 1 "dynamic" 2 "auto" 3 "fixed" 4 "unknown" 5 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setipmode webapis network networkipmode static ; } catch e { console error "setipmode exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setipmode] success" ; } getsubnetmask retrieves the device's configured subnet mask address domstring getsubnetmask ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring subnet mask address for the currently-configured network example 255 255 255 0 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var netmask = null; try { netmask = webapis network getsubnetmask ; } catch e { console log "getsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; } if null != netmask { console log "[getsubnetmask] netmask " + netmask ; } setsubnetmask configures device's subnet mask void setsubnetmask domstring subnet ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters subnet subnet mask to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setsubnetmask "255 255 255 0" ; } catch e { console error "setsubnetmask exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsubnetmask] success" ; } getgateway retrieves the device's configured gateway address domstring getgateway ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring gateway address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var gateway = null; try { gateway = webapis network getgateway ; } catch e { console log "getgateway exception [" + e code + "] name " + e name + " message " + e message ; } if null != gateway { console log "[getgateway] gateway " + gateway ; } setgateway configures device's gateway address void setgateway domstring gateway ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters gateway gateway to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setgateway "107 109 92 1" ; } catch e { console error "setgateway exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setgateway] success" ; } getmac retrieves the network device's mac address domstring getmac ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring mac address for the currently-configured network example 50 b7 a3 c2 96 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var mac = null; try { mac = webapis network getmac ; } catch e { console log "getmac exception [" + e code + "] name " + e name + " message " + e message ; } if null != mac { console log "[getmac] mac " + mac ; } getdns retrieves the device's configured dns address domstring getdns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring dns address for the currently-configured network example 192 168 0 1 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var dns = null; try { dns = webapis network getdns ; } catch e { console log "getdns exception [" + e code + "] name " + e name + " message " + e message ; } if null != dns { console log "[getdns] dns " + dns ; } setdns configures device's dns address void setdns domstring dns ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters dns dns to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setdns "8 8 8 8" ; } catch e { console error "setdns exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setdns] success" ; } getip retrieves the device's configured ip address domstring getip ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring ip address for the currently-configured network example 192 168 0 11 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var ip = null; try { ip = webapis network getip ; } catch e { console log "getip exception [" + e code + "] name " + e name + " message " + e message ; } if null != ip { console log "[getip] ip " + ip ; } setip configures device's ip address void setip domstring ip ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters ip ip to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with the error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setip "107 109 92 9" ; } catch e { console error "setip exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setip] success" ; } getproxyserverinfo retrieves the device's configured proxy server info domstring getproxyserverinfo ; product b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring proxy server info exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var proxy = null; try { proxy = network getproxyserverinfo ; } catch e { console log "getproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; } if null != proxy { console log "[getproxyserverinfo] proxy " + proxy ; } setproxyserverinfo configures device's proxy server info void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; product b2b privilege level public privilege http //developer samsung com/privilege/network public parameters id id to be set pwd password to be set url url to be set port port to be set exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror if different type argument values are passed for an input parameter with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 6 5 code example var err = false; try { webapis network setproxyserverinfo "id", "pwd", "10 20 30 40", "9998" ; } catch e { console error "setproxyserverinfo exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setproxyserverinfo] success" ; } gettvname retrieves the device's configured name when device is connected to a network domstring gettvname ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring device name for any connected network example tizen_device exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 4 0 code example var tvname = null; try { tvname = webapis network gettvname ; } catch e { console log "gettvname exception [" + e code + "] mname " + e name + " message " + e message ; } if null != tvname { console log "[gettvname] tvname " + tvname ; } getactiveconnectiontype retrieves the device's currently-active connection type networkactiveconnectiontype getactiveconnectiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkactiveconnectiontype unsigned long currently-active network connection type "disconnected" 0 "wifi" 1 "cellular" 2 "ethernet" 3 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method since 2 3 code example var conntype = null; var retval = null; try { retval = webapis network getactiveconnectiontype ; } catch e { console error "getactiveconnectiontype exception [" + e code + "] message " + e message ; } if null != retval { switch retval { case webapis network networkactiveconnectiontype disconnected conntype = "disconnected"; break; case webapis network networkactiveconnectiontype wifi conntype = "wifi"; break; case webapis network networkactiveconnectiontype cellular conntype = "cellular"; break; case webapis network networkactiveconnectiontype ethernet conntype = "ethernet"; break; default conntype = "error"; } console log "[getactiveconnectiontype] active connection type " + conntype ; } addnetworkstatechangelistener registers an asynchronous event listener unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listener callback method for example listenerid = network addnetworkstatechangelistener onchange ; return value unsigned long unsigned long application async listener id exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type since 2 3 code example var onchange = function data { console log "[networkstatechangedcallback] data " + data + " changed" ; } try { listenerid = webapis network addnetworkstatechangelistener onchange ; } catch e { console log "addnetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; } if listenerid > -1 { console log "addnetworkstatechangelistener success listener id [" + listenerid + "] " ; } removenetworkstatechangelistener unregisters an asynchronous event listener void removenetworkstatechangelistener unsigned long listenerid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters listenerid listenerid to be removed exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type typemismatcherror, if an input parameter is not compatible with its expected type with error type invalidvalueserror, if the listenerid value is not the same as the value generated by addnetworkstatechangelistener since plugin version 3 0 since 2 3 code example try { console log "begin removenetworkstatechangelistener listenerid " + listenerid ; webapis network removenetworkstatechangelistener listenerid ; } catch e { console log "removenetworkstatechangelistener exception [" + e code + "] name " + e name + " message " + e message ; return; } console log "removenetworkstatechangelistener success" ; getwifissid retrieves the wi-fi network ssid works only when the active connection type is wi-fi domstring getwifissid ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring wi-fi network ssid example strawbarry exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifissid = null; try { wifissid = webapis network getwifissid ; } catch e { console log "getwifissid exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifissid { console log "[getwifissid] wifissid " + wifissid ; } getwifisignalstrengthlevel retrieves the wi-fi signal strength works only when the active connection type is wi-fi long getwifisignalstrengthlevel ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long long signal strength level valid values are 1 to 5 signal strength is strongest when the value is 5 8dbm 8 ~ -77dbm 7 ~ -66dbm 6 ~ -55dbm 5dbm exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisignalstrengthlevel = null; try { wifisignalstrengthlevel = webapis network getwifisignalstrengthlevel ; } catch e { console log "getwifisignalstrengthlevel exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisignalstrengthlevel { console log "[getwifisignalstrengthlevel] wifisignalstrengthlevel " + wifisignalstrengthlevel ; } getwifisecuritymode retrieves the wi-fi security mode works only when the active connection type is wi-fi networkwifisecuritymode getwifisecuritymode ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifisecuritymode unsigned long wi-fi security mode "wep" 1 "wpa_psk" 2 "wpa2_psk" 3 "eap" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifisecuritymode = null; try { wifisecuritymode = webapis network getwifisecuritymode ; } catch e { console log "getwifisecuritymode exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifisecuritymode { console log "[getwifisecuritymode] wifisecuritymode " + wifisecuritymode ; } getwifiencryptiontype retrieves the wi-fi encryption type works only when the active connection type is wi-fi networkwifiencryptiontype getwifiencryptiontype ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value networkwifiencryptiontype unsigned long wi-fi encryption type "wep" 1 "tkip" 2 "aes" 3 "tkip_aes_mixed" 4 "none" 5 "unknown" 6 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since plugin version 3 0 since 2 3 code example var wifiencryptiontype = null; try { wifiencryptiontype = webapis network getwifiencryptiontype ; } catch e { console log "getwifiencryptiontype exception [" + e code + "] name " + e name + " message " + e message ; } if null != wifiencryptiontype { console log "[getwifiencryptiontype] wifiencryptiontype " + wifiencryptiontype ; } getsecondarydns retrieves the device's configured secondary dns address domstring getsecondarydns ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value domstring domstring secondary dns address example 192 168 0 100 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 2 3 code example var secondarydns = null; try { secondarydns = webapis network getsecondarydns ; } catch e { console error "getsecondarydns exception [" + e code + "] name " + e name + " message " + e message ; } if null != secondarydns { console log "[getsecondarydns] secondarydns " + secondarydns ; } setdhcpoption60field sets the dhcp option 60 vendor string works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void setdhcpoption60field domstring vendorname ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 parameters vendorname dhcp option 60 vendor name string exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 with error type typemismatcherror, if an input parameter is not compatible with its expected type since plugin version 3 0 since 2 3 code example try { webapis network setdhcpoption60field "cisco" ; } catch e { console error "setdhcpoption60field exception [" + e code + "] message " + e message ; } console log "[setdhcpoption60field] dhcpoption60field success " ; removedhcpoption60field sets the dhcp option 60 vendor string to the default value, "udhcpc1 21 1" works only when the active connection type is wired the vendor string is updated when udhcpc is restarted or relaunched void removedhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example try { webapis network removedhcpoption60field ; } catch e { console error "removedhcpoption60field exception [" + e code + "] message " + e message ; } console log "[removedhcpoption60field] dhcpoption60field success " ; getcurrentdhcpoption60field retrieves the dhcp option 60 vendor string works only when the active connection type is wired domstring getcurrentdhcpoption60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor-specific string default value is "default" example if setdhcpoption60field = "cisco" then getcurrentdhcpoption60field = "cisco" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network getcurrentdhcpoption60field ; } catch e { console error "getcurrentdhcpoption60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[getcurrentdhcpoption60field] dhcpoption60field " + dhcpoption60field ; } checkcurrentipwith60field retrieves the dhcp option 60 vendor string currently used by udhcp works only when the active connection type is wired domstring checkcurrentipwith60field ; product tv, av, b2b privilege level partner privilege http //developer samsung com/privilege/network dhcpoption60 return value domstring domstring vendor string example if udhcpc is running with the default string "udhcpc1 21 1", after calling setdhcpoption60field = "cisco", checkcurrentipwith60field= "udhcpc1 21 1" exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if the active connection type is wi-fi since plugin version 3 0 since 2 3 code example var dhcpoption60field = null; try { dhcpoption60field = webapis network checkcurrentipwith60field ; } catch e { console error "checkcurrentipwith60field exception [" + e code + "] name " + e name + " message " + e message ; } if null != dhcpoption60field { console log "[checkcurrentipwith60field] dhcpoption60field " + dhcpoption60field ; } enablesoftap this method enables softap in hotel tv void enablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network enablesoftap ; } catch e { console error "enable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[enablesoftap] success" ; } disablesoftap this method disables softap in hotel tv void disablesoftap ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { webapis network disablesoftap ; } catch e { console error "disable softap exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[disablesoftap] success" ; } issoftapenabled this method gets the softap status in hotel tv whether it is enabled or not boolean issoftapenabled ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value boolean boolean it returns true if softap is enabled, false if softap is disabled exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var status = null; try { status = webapis network issoftapenabled ; } catch e { console error "issoftapenabled exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if null != status { console log "[issoftapenabled] status " + status ; } getsoftapssid this method returns the softap ssid domstring getsoftapssid ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap ssid from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var ssid = null; try { ssid = webapis network getsoftapssid ; } catch e { console error "getsoftapssid exception [" + e code + "] name " + e name + " message " + e message ; } if null != ssid { console log "[getsoftapssid] ssid " + ssid ; } setsoftapchannel this method sets the softap channel to specified channel void setsoftapchannel long channel ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters channel softap channel to be set exceptions webapiexception with error type typemismatcherror, if invalid long type passed for 'channel' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapchannel 5 ; } catch e { console error "setsoftapchannel exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapchannel] success" ; } getsoftapsecuritykey this method returns the softap security key domstring getsoftapsecuritykey ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap return value domstring domstring it returns the softap security key from tethering module exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 since 3 0 code example var key = null; try { key = webapis network getsoftapsecuritykey ; } catch e { console error "getsoftapsecuritykey exception [" + e code + "] name " + e name + " message " + e message ; } if null != key { console log "[getsoftapsecuritykey] key " + key ; } setsoftapsignalstrength this method sets softap signal strength to a specific value void setsoftapsignalstrength unsigned long power ; product b2b htv privilege level public privilege http //developer samsung com/privilege/network softap parameters power signal strength 0-100 exceptions webapiexception with error type typemismatcherror, if invalid unsigned long type passed for 'power' parameter with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 with error type invalidstateerror, if connected on wireless connection as softap feature is valid for only wired connection since plugin version 3 0 with error type invalidvalueserror, if power is out of range since 3 0 code example var err = false; try { //take input from user and forward it to below api webapis network setsoftapsignalstrength 100 ; } catch e { console error "setsoftapsignalstrength exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[setsoftapsignalstrength] success" ; } seteapcafilepath set the peap certification file path for peap base ap connection void seteapcafilepath domstring path ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters path peap certification file path exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'path' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteapcafilepath "/opt/usr/home/owner/share/root_test/ca der" ; } catch e { console error "seteapcafilepath exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteapcafilepath] success" ; } seteappassphrase sets the username and password void seteappassphrase domstring name, domstring password ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public parameters name to be set password to be set exceptions webapiexception with error type typemismatcherror, if invalid domstring type passed for 'name' and 'password' parameter with error type securityerror, if the application does not have the privilege to call this method since 6 5 code example var err = false; try { webapis network seteappassphrase "testing11", "password11" ; } catch e { console error "seteappassphrase exception [" + e code + "] name " + e name + " message " + e message ; err = true; } if err != true { console log "[seteappassphrase] success" ; } getwififrequency retrieves the wi-fi network frequency works only when the active connection type is wi-fi long getwififrequency ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/network public return value long wi-fi network frequency mhz exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a wi-fi connection is not available since 6 0 code example var wififrequency = null; try { wififrequency = webapis network getwififrequency ; } catch e { console log "getwififrequency exception [" + e code + "] name " + e name + " message " + e message ; } if null != wififrequency { console log "[getwififrequency] wififrequency " + wififrequency ; } 1 3 networkstatechangedcallback defines a listener for gateway connection state change notifications [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; methods onchange callback method for gateway connection state change notifications void onchange networkstate state ; privilege level public privilege http //developer samsung com/privilege/network public parameters state connection state exceptions webapiexception with error type securityerror, if the application does not have the privilege to call this method with error type invalidstateerror, if a network connection is not available since plugin version 3 0 since 3 0 code example var gatewaystatus =null; var onchange = function data { if data == webapis network networkstate gateway_connected { gatewaystatus ="gateway_connected"; } else if data == webapis network networkstate gateway_disconnected { gatewaystatus ="gateway_disconnected"; } else{ gatewaystatus ="status unknown"; } console log "[networkstatechangedcallback] data " + data +" "+ gatewaystatus ; } 1 4 networkipmode defines constants for network ip modes [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; constants none no network ip mode configured static connected to wired or wireless ipv4 network through static ip configuration dynamic connected to wired or wireless ipv6 network through dynamic ip configuration auto dhcp connected to wired or wireless ipv4 network through automatic ip configuration fixed connected to cellular network through fixed ip configuration unknown no wired or wireless connection 1 5 networkactiveconnectiontype defines constants for network connection types [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; constants disconnected no network configured wifi connected to a wi-fi network cellular connected to a cellular network ethernet connected to an ethernet network 1 6 networkstate defines constants for network states [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; constants internet_connected internet connected lan_cable_attached lan cable connected lan_cable_detached lan cable disconnected lan_cable_state_unknown lan cable connection state unknown gateway_connected gateway connected gateway_disconnected gateway disconnected wifi_module_state_attached wi-fi module connected wifi_module_state_detached wi-fi module disconnected wifi_module_state_unknown wi-fi module connection state unknown internet_disconnected internet disconnected 1 7 networkwifisecuritymode defines constants for wi-fi network security modes [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep security mode wpa_psk psk security mode wpa2_psk wpa2_psk security mode eap eap security mode none open security mode unknown security mode unknown 1 8 networkwifiencryptiontype defines constants for wi-fi network encryption types [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; constants wep wep encryption tkip tkip encryption aes aes encryption tkip_aes_mixed tkip_aes_mixed encryption none no encryption unknown encryption type unknown 2 full webidl module network { [nointerfaceobject] interface networkmanagerobject { readonly attribute networkmanager network; }; webapi implements networkmanagerobject; [nointerfaceobject] interface networkmanager { attribute networkactiveconnectiontype networkactiveconnectiontype; attribute networkipmode networkipmode; attribute networkstate networkstate; attribute networkwifisecuritymode networkwifisecuritymode; attribute networkwifiencryptiontype networkwifiencryptiontype; domstring getversion ; boolean isconnectedtogateway ; networkipmode getipmode ; void setipmode networkipmode ipmode ; domstring getsubnetmask ; void setsubnetmask domstring subnet ; domstring getgateway ; void setgateway domstring gateway ; domstring getmac ; domstring getdns ; void setdns domstring dns ; domstring getip ; void setip domstring ip ; domstring getproxyserverinfo ; void setproxyserverinfo domstring id, domstring pwd, domstring url, domstring port ; domstring gettvname ; networkactiveconnectiontype getactiveconnectiontype ; unsigned long addnetworkstatechangelistener networkstatechangedcallback listener ; void removenetworkstatechangelistener unsigned long listenerid ; domstring getwifissid ; long getwifisignalstrengthlevel ; networkwifisecuritymode getwifisecuritymode ; networkwifiencryptiontype getwifiencryptiontype ; domstring getsecondarydns ; void setdhcpoption60field domstring vendorname ; void removedhcpoption60field ; domstring getcurrentdhcpoption60field ; domstring checkcurrentipwith60field ; void enablesoftap ; void disablesoftap ; boolean issoftapenabled ; domstring getsoftapssid ; void setsoftapchannel long channel ; domstring getsoftapsecuritykey ; void setsoftapsignalstrength unsigned long power ; void seteapcafilepath domstring path ; void seteappassphrase domstring name, domstring password ; long getwififrequency ; }; [callback = functiononly, nointerfaceobject] interface networkstatechangedcallback { void onchange networkstate state ; }; [nointerfaceobject] interface networkipmode { const unsigned long none = 0; const unsigned long static = 1; const unsigned long dynamic = 2; const unsigned long auto = 3; const unsigned long fixed = 4; const unsigned long unknown = 5; }; [nointerfaceobject] interface networkactiveconnectiontype { const unsigned long disconnected = 0; const unsigned long wifi = 1; const unsigned long cellular = 2; const unsigned long ethernet = 3; }; [nointerfaceobject] interface networkstate { const unsigned long internet_connected = 0; const unsigned long lan_cable_attached = 1; const unsigned long lan_cable_detached = 2; const unsigned long lan_cable_state_unknown = 3; const unsigned long gateway_connected = 4; const unsigned long gateway_disconnected = 5; const unsigned long wifi_module_state_attached = 6; const unsigned long wifi_module_state_detached = 7; const unsigned long wifi_module_state_unknown = 8; const unsigned long internet_disconnected = 9; }; [nointerfaceobject] interface networkwifisecuritymode { const unsigned long wep = 1; const unsigned long wpa_psk = 2; const unsigned long wpa2_psk = 3; const unsigned long eap = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; [nointerfaceobject] interface networkwifiencryptiontype { const unsigned long wep = 1; const unsigned long tkip = 2; const unsigned long aes = 3; const unsigned long tkip_aes_mixed = 4; const unsigned long none = 5; const unsigned long unknown = 6; }; };
Develop Smart Signage
apiconsole log "[getversion] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } if null !== version { console log "[getversion] call syncfunction type " + version ; } open prepare the document for playing and setting the necessary values for the play operation void open documentinfo docinfo, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters docinfo document basic information onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[open] success " + val ; }; var onerror = function error { console log "[open] code " + error code + " error name " + error name + " message " + error message ; }; var docinfo = { "docpath" "http //107 109 202 6 80/1 pdf", "rectx" 0, "recty" 0, "rectwidth" 960, "rectheight" 540 }; try { webapis document open docinfo, onsuccess, onerror ; } catch e { console log "[open] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } close this interface provides a method to close a playing document void close documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[close] success " + val ; }; var onerror = function error { console log "[close] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document close onsuccess, onerror ; } catch e { console log "[close] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } play this interface provides a method to play a document void play long slidetime, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters slidetime time spent on a slide, in seconds onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[play] success " + val ; }; var onerror = function error { console log "[play] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document play 5, onsuccess, onerror ; } catch e { console log "[play] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } stop this interface provides a method to stop document playback void stop documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[stop] success " + val ; }; var onerror = function error { console log "[stop] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document stop onsuccess, onerror ; } catch e { console log "[stop] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } prevpage this interface provides a method to move to the previous page of a document void prevpage documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[prevpage] success " + val ; }; var onerror = function error { console log "[prevpage] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document prevpage onsuccess, onerror ; } catch e { console log "[prevpage] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } nextpage this interface provides a method to move to the next page of a document void nextpage documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[nextpage] success " + val ; }; var onerror = function error { console log "[nextpage] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document nextpage onsuccess, onerror ; } catch e { console log "[nextpage] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } pause this interface provides a method to pause document playback void pause documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[pause] success " + val ; }; var onerror = function error { console log "[pause] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document pause onsuccess, onerror ; } catch e { console log "[pause] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } resume this interface provides a method to resume document playback void resume documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[resume] success " + val ; }; var onerror = function error { console log "[resume] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document resume onsuccess, onerror ; } catch e { console log "[resume] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } setdocumentorientation this interface provides a method for vertical document playback void setdocumentorientation documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[setdocumentorientation] success " + val ; }; var onerror = function error { console log "[setdocumentorientation] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document setdocumentorientation onsuccess, onerror ; } catch e { console log "[setdocumentorientation] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } gotopage this interface provides a method to go to a specified page void gotopage long page, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; product b2b lfd privilege level partner privilege http //developer samsung com/privilege/documentplay parameters page page to be moved to onsuccess callback method to be invoked when this method executes successfully onerror [optional][nullable] callback method to be invoked when an error occurs the error type is securityerror if the application does not have the privilege to call this method the error type is unknownerror in any other error case exceptions webapiexception with the error type typemismatcherror since 6 5 code example var onsuccess = function val { console log "[gotopage] success " + val ; }; var onerror = function error { console log "[gotopage] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document gotopage 3, onsuccess, onerror ; } catch e { console log "[gotopage] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } 2 4 documentsuccesscallback this callback interface defines the device information success callback [callback = functiononly, nointerfaceobject] interface documentsuccesscallback { void onsuccess result data ; }; methods onsuccess callback parameter void onsuccess result data ; privilege level partner privilege http //developer samsung com/privilege/documentplay parameters data status of the operation since 6 5 code example var onsuccess = function val { console log "[gotopage] success " + val ; }; var onerror = function error { console log "[gotopage] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document gotopage 3, onsuccess, onerror ; } catch e { console log "[gotopage] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } 2 5 documenterrorcallback this callback interface defines the device information error callback [callback = functiononly, nointerfaceobject] interface documenterrorcallback { void onerror error data ; }; methods onerror callback parameter void onerror error data ; privilege level partner privilege http //developer samsung com/privilege/documentplay parameters data status of the operation since 6 5 code example var onsuccess = function val { console log "[gotopage] success " + val ; }; var onerror = function error { console log "[gotopage] code " + error code + " error name " + error name + " message " + error message ; }; try { webapis document gotopage 3, onsuccess, onerror ; } catch e { console log "[gotopage] call syncfunction exception [" + e code + "] name " + e name + " message " + e message ; } 3 full webidl module document { dictionary result { domstring result; domstring data; }; dictionary error { domstring code; domstring name; domstring message; }; [nointerfaceobject] interface documentinfo { attribute domstring docpath; attribute long rectx; attribute long recty; attribute long rectwidth; attribute long rectheight; }; [nointerfaceobject] interface documentmanagerobject { readonly attribute documentmanager document; }; webapi implements documentmanagerobject; [nointerfaceobject] interface documentmanager { domstring getversion ; void open documentinfo docinfo, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void close documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void play long slidetime, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void stop documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void prevpage documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void nextpage documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void pause documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void resume documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void setdocumentorientation documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; void gotopage long page, documentsuccesscallback onsuccess, optional documenterrorcallback? onerror ; }; [callback = functiononly, nointerfaceobject] interface documentsuccesscallback { void onsuccess result data ; }; [callback = functiononly, nointerfaceobject] interface documenterrorcallback { void onerror error data ; }; };
Develop Smart TV
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } read reads encrypted data in a specified file found in the local path void read successcallback onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess callback method to invoke when the data is successfully read onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess data { console log "success read " + data ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata read onsuccess, onerror ; } catch error { console log " error code = " + error code ; } write writes encrypted data in a specified file found in the local path void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters data data, up to 20000 characters onsuccess [optional][nullable] callback method to invoke when the data is successfully written onerror [optional][nullable] callback method to invoke if an error occurs domstringsizeerror, if any of the input parameters exceeds the limited size securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success write" ; } function onerror error { console log "error code " + error code ; } try { var data = "string data"; webapis widgetdata write data, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } remove removes encrypted data in a specified file found in the local path void remove optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess [optional][nullable] callback method to invoke when the data is successfully removed onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success remove" ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata remove onsuccess, onerror ; } catch error { console log " error code = " + error code ; } 2 full webidl module widgetdata { [nointerfaceobject] interface widgetdatamanagerobject { readonly attribute widgetdatamanager widgetdata; }; webapi implements widgetdatamanagerobject; [nointerfaceobject] interface widgetdatamanager { domstring getversion ; void read successcallback onsuccess, optional errorcallback? onerror ; void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; void remove optional successcallback? onsuccess, optional errorcallback? onerror ; }; };
Develop Smart Signage
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } read reads encrypted data in a specified file found in the local path void read successcallback onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess callback method to invoke when the data is successfully read onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess data { console log "success read " + data ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata read onsuccess, onerror ; } catch error { console log " error code = " + error code ; } write writes encrypted data in a specified file found in the local path void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters data data, up to 20000 characters onsuccess [optional][nullable] callback method to invoke when the data is successfully written onerror [optional][nullable] callback method to invoke if an error occurs domstringsizeerror, if any of the input parameters exceeds the limited size securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success write" ; } function onerror error { console log "error code " + error code ; } try { var data = "string data"; webapis widgetdata write data, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } remove removes encrypted data in a specified file found in the local path void remove optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess [optional][nullable] callback method to invoke when the data is successfully removed onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success remove" ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata remove onsuccess, onerror ; } catch error { console log " error code = " + error code ; } 2 full webidl module widgetdata { [nointerfaceobject] interface widgetdatamanagerobject { readonly attribute widgetdatamanager widgetdata; }; webapi implements widgetdatamanagerobject; [nointerfaceobject] interface widgetdatamanager { domstring getversion ; void read successcallback onsuccess, optional errorcallback? onerror ; void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; void remove optional successcallback? onsuccess, optional errorcallback? onerror ; }; };
Develop Smart Hospitality Display
apiconsole log " version value = " + value ; } catch error { console log " error code = " + error code ; } read reads encrypted data in a specified file found in the local path void read successcallback onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess callback method to invoke when the data is successfully read onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess data { console log "success read " + data ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata read onsuccess, onerror ; } catch error { console log " error code = " + error code ; } write writes encrypted data in a specified file found in the local path void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters data data, up to 20000 characters onsuccess [optional][nullable] callback method to invoke when the data is successfully written onerror [optional][nullable] callback method to invoke if an error occurs domstringsizeerror, if any of the input parameters exceeds the limited size securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success write" ; } function onerror error { console log "error code " + error code ; } try { var data = "string data"; webapis widgetdata write data, onsuccess, onerror ; } catch error { console log " error code = " + error code ; } remove removes encrypted data in a specified file found in the local path void remove optional successcallback? onsuccess, optional errorcallback? onerror ; product tv, av, b2b privilege level public privilege http //developer samsung com/privilege/widgetdata parameters onsuccess [optional][nullable] callback method to invoke when the data is successfully removed onerror [optional][nullable] callback method to invoke if an error occurs notfounderror, if no file was found in the local path securityerror, if the application does not have the privilege to call this method unknownerror, if any other error occurs exceptions webapiexception with error type typemismatcherror, if an input parameter is not compatible with its expected type since 4 0 code example function onsuccess { console log "success remove" ; } function onerror error { console log "error code " + error code ; } try { webapis widgetdata remove onsuccess, onerror ; } catch error { console log " error code = " + error code ; } 2 full webidl module widgetdata { [nointerfaceobject] interface widgetdatamanagerobject { readonly attribute widgetdatamanager widgetdata; }; webapi implements widgetdatamanagerobject; [nointerfaceobject] interface widgetdatamanager { domstring getversion ; void read successcallback onsuccess, optional errorcallback? onerror ; void write domstring data, optional successcallback? onsuccess, optional errorcallback? onerror ; void remove optional successcallback? onsuccess, optional errorcallback? onerror ; }; };
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.