javascripttypescripttizensamsung-smart-tvtizen-web-app

Unable to Turn On the Samsung Tizen TV using the provided APIs


I have a Tizen Application to control the TV Operations like Volume Controls, Power Off, etc. I am using b2bapis for Power Off and Power On, but I cannot find the proper documentation for the same. I am able to turn off my Samsung Tizen TV using the following method as provided:

b2bapis.b2bcontrol.setPowerOff(() => {
  console.log('Success');
}, (err)=> {
  console.log('err: ', err)
});

but I am not able to turn on the TV back using this method:

b2bapis.b2bpower.setPowerOn(()=> {
    console.log('Success');
}, (err)=> {
    console.log('err: ', err)
})

getting the following error with the message, You do not have the privilege:

enter image description here

There is nothing mentioned which privilege I am missing, Here is the list of privileges I had mentioned in my application:

    <tizen:privilege name="http://tizen.org/feature/display.state"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/b2bpower"/>
    <tizen:privilege name="http://tizen.org/privilege/tv"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/systemcontrol"/>
    <tizen:privilege name="http://tizen.org/privilege/remotepower"/>
    <tizen:privilege name="http://tizen.org/privilege/power"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.display"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/display"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/avplay"/>
    <tizen:privilege name="http://tizen.org/privilege/mediastorage"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
    <tizen:privilege name="http://tizen.org/privilege/mediastreaming"/>
    <tizen:privilege name="http://tizen.org/privilege/mediacontroller.client"/>
    <tizen:privilege name="http://tizen.org/privilege/internet"/>
    <tizen:privilege name="http://tizen.org/privilege/drm"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/b2bcontrol"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/contentsdownload"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/drmplay"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/tvinfo"/>
    <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.window"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.product"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.videoplayer"/>
    <tizen:privilege name="http://tizen.org/privilege/miscdevetc"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
    <tizen:privilege name="http://tizen.org/privilege/appmanager.kill"/>

config.xml:

<?xml version="1.0" encoding="UTF-8"?>
<widget xmlns:tizen="http://tizen.org/ns/widgets" xmlns="http://www.w3.org/ns/widgets" id="http://yourdomain/TizenWebApp" version="1.0.0" viewmodes="fullscreen">
    <tizen:application id="y7BqtdUB70.TizenWebApp" package="y7BqtdUB70" required_version="2.3"/>
    <content src="index.html"/>
    <feature name="http://tizen.org/feature/screen.size.normal.1080.1920"/>
    <icon src="icon.png"/>
    <tizen:metadata key="http://tizen.org/metadata/app_ui_type/base_screen_resolution" value="extensive"/>
    <name>Tizen Web App</name>
    <tizen:privilege name="http://tizen.org/feature/display.state"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/b2bpower"/>
    <tizen:privilege name="http://tizen.org/privilege/tv"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/systemcontrol"/>
    <tizen:privilege name="http://tizen.org/privilege/remotepower"/>
    <tizen:privilege name="http://tizen.org/privilege/power"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.display"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/display"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/avplay"/>
    <tizen:privilege name="http://tizen.org/privilege/mediastorage"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.read"/>
    <tizen:privilege name="http://tizen.org/privilege/filesystem.write"/>
    <tizen:privilege name="http://tizen.org/privilege/mediastreaming"/>
    <tizen:privilege name="http://tizen.org/privilege/mediacontroller.client"/>
    <tizen:privilege name="http://tizen.org/privilege/internet"/>
    <tizen:privilege name="http://tizen.org/privilege/drm"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/b2bcontrol"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.inputdevice"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/contentsdownload"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/drmplay"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/tvinfo"/>
    <tizen:privilege name="http://tizen.org/privilege/application.launch"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.window"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.product"/>
    <tizen:privilege name="http://tizen.org/privilege/tv.videoplayer"/>
    <tizen:privilege name="http://tizen.org/privilege/miscdevetc"/>
    <tizen:privilege name="http://developer.samsung.com/privilege/network.public"/>
    <tizen:privilege name="http://tizen.org/privilege/appmanager.kill"/>
    <tizen:profile name="tv-samsung"/>
    <tizen:setting screen-orientation="auto-rotation" context-menu="enable" background-support="enable" encryption="disable" install-location="auto" hwkey-event="enable"/>
</widget>

Environment:

Am I doing something wrong or is there any alternative?


Solution

  • <tizen:application id="y7BqtdUB70.TizenWebApp" package="y7BqtdUB70" required_version="2.3"/> The required version of the app is too low. Please update it to 2.4 or higher.