SlideShare une entreprise Scribd logo
1  sur  27
Télécharger pour lire hors ligne
Samsung Smart TV SDK

Manikantan K
Manikantan.k@samsung.com
@manikantan_k
What is Samsung SMART TV App?
• Samsung Smart TV applications are web-based small
software programs that run on Digital TVs connected to
the Internet.
• Applications are installed on TVs via Internet and run on
App Engine

Application Manager
App Engine
Operating Principle
Samsung D Forum

Visit www.samsungdforum.com to download the latest SDK
Smart TV SDK evolution
2.x

• Designed for 2011 Devices ( D Model )
• HTML5/CSS3 Support
• Maple Web Engine

3.x

• Designed for 2012 Devices ( E Model )
• Smart Interaction, In-Apps Ads & Convergence Support
• WebKit Web Engine

4.x

• Designed for 2013 Devices ( F Model )
• Smart Interaction 2.0 Support
• Eclipse Based IDE (Linux & Mac OS SDK Available)

http://www.samsungdforum.com
Project Types

Flash 11.1

Native Client
SDK 4.5+
Improved HTML5 support
• Support for <video> and <audio> tags
• For formats & support, see link
<video src=“movie.mp4” width=“320” height=“240”>
No HTML5 video tag support.
</video>

http://www.samsungdforum.com/Guide/art00066/index.html
Improved HTML5 support
• Support for <canvas> tag
<canvas id=“example” width=“200” height=“200”>
This text is displayed if your browser does not support HTML5 canvas.
</canvas>

var example = document.getElementById(‘example’);
var context = example.getContext(‘2d’);
context.fillStyle = “rgd(255,0,0)”;
context.fillRect(30,30,50,50);

http://www.samsungdforum.com/Guide/art00066/index.html
Web Device API
List of APIs to access low level functionalities of the Smart TV like

•
•
•
•
•
•
•
•

Network capabilities
TV channels
Gamepad connectivity
External Camera support
Microphone
Filesystem
Voice recognition
MIDI etc
<script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js"></script>
Web Device API > Network
• Check network connection
• Set Listeners for changes
try {
webapis.network.getAvailableNetworks(successCB, errorCB);
} catch(err) {
alert(err.name);
}
function successCB(networks) {
for(var i=0; I < networks.length; i++) {
if(networks[i].isActive() ) {
networks[i].setWatchListener(watchCB, errCB);
}}
}

http://www.samsungdforum.com/Guide/ref00008/network/dtv_network_module.html
Web Device API > TVChannel
• Get ProgramList for current channel
try {
var channel = webapis.tv.channel.getCurrentChannel();
webapis.tv.channel.getProgramList(channel, webapis.tv.info.getEpochTime(),
successCB, errorCB, 3600 );
} catch(err) {
alert(err.name);
}
function successCB(programs) {
console.log(“program query success”);
}

http://www.samsungdforum.com/Guide/ref00008/tvchannel/dtv_tvchannel_module.htm
l
Single Handed Gestures
• You need to include mouse support in
config.xml
<mouse>y</mouse>

• Mouse listener like the web.
• Create a div in scene1.html
<div id="button0">Button</div> <!-- make it as button -->
<div id="div0“></div>
<!-- make it as trial element -->

• Adding listener
document.getElementById('div0').addEventListener('mouseover', function(){
document.getElementById('div0').style.backgroundColor = 'lime';
}, false);
document.getElementById('div0').addEventListener('mouseout', function(){
document.getElementById('div0').style.backgroundColor = 'yellow';
}, false);
document.getElementById('div0').addEventListener('click', function(){
alert("clicked");
}, false);
Double Handed Gestures
Check for support/enabled
if (webapis.recognition.IsRecognitionSupported()) {
if (webapis.recognition.IsGestureRecognitionEnabled()) {
// perform Recognition related actions here, e.g. subscribe }
else { alert("ERROR: Gesture recognition is not enabled"); }
} else { alert("ERROR: Gesture recognition not supported"); }

Subscribe to events
webapis.recognition.SubscribeExEvent(webapis.recognition.PL_RECOGNITION_T
YPE_GESTURE, “returnID", function (evt) { that.handleRecognitionEvent.call(that,
evt); });
EVENT_GESTURE_2HAND_ZOOM , EVENT_GESTURE_2HAND_ROTATE etc
Voice Recognition
• Embedded Mode

Predefined voice commands.
The engine does more of comparison than recognition
Does NOT require internet.
Limited to comparing between 7 items.

• Server Guide Mode

Free- form speech.
Depends heavily on user’s linguistics and pronunciation.
Voice Data is sent to internet to recognize user’s speech.
No limits.
Voice Recognition
• Add the voice tag in the config.xml
– <voice>y</voice>
• Include the following library in the index.html
– $MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js
– The VR library can be used under the deviceapis.recognition
object

• Set Helpbar!
Voice Recognition
• Not all TV Series have VR feature, it be best to
check device compatibility before using the
feature.
• Check Device VR Feature Availibility:
– deviceapis.recognition.IsRecognitionSupported()

• Check Device VR Feature Enabled or Disabled:
– deviceapis.recognition.IsVoiceRecognitionEnabled()

• Check Device Server Guide VR Availibility:
– deviceapis.recognition.IsVoiceServerLanguageSupported()
Voice Recognition
• Since the VR runs separately with apps, the apps must
subscribe to VR events to use the data from VR.
deviceapis.recognition.SubscribeExEvent(
deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE,
"VoiceEvt",
Main.onVoiceEvent
);
deviceapis.recognition.UnsubscribeExEvent(
deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE,
"VoiceEvt”
);
Built-In Emulator

Virtual Box based. Can test voice and gesture input.
Web Inspector

Breakpoints, stepping and debugging support
Automatic Test Tool

Create input test sequences, schedule screen captures, record events
Important TV vs Emulator
• Performance
• Viewing Distance
• Usage with remote control /
Interaction
Thank You

Contenu connexe

En vedette

Marketing strategy of samsung in India
Marketing strategy of samsung in IndiaMarketing strategy of samsung in India
Marketing strategy of samsung in India
vikas chauhan
 
Tizen-based Samsung TV SDK IDE Help Guide
Tizen-based Samsung TV SDK IDE Help GuideTizen-based Samsung TV SDK IDE Help Guide
Tizen-based Samsung TV SDK IDE Help Guide
Ryo Jin
 
Tizen-based Samsung TV Web Simulator
Tizen-based Samsung TV Web SimulatorTizen-based Samsung TV Web Simulator
Tizen-based Samsung TV Web Simulator
Ryo Jin
 

En vedette (16)

LG Smart tv
LG Smart tvLG Smart tv
LG Smart tv
 
Smart TV and APIs
Smart TV and APIsSmart TV and APIs
Smart TV and APIs
 
Introduction to Firebase from Google
Introduction to Firebase from GoogleIntroduction to Firebase from Google
Introduction to Firebase from Google
 
Television marketing
Television marketingTelevision marketing
Television marketing
 
SAMSUNG LCD TELEVISION - DISTRIBUTION CHANNEL RELATIONSHIP AND MARKET SHARE A...
SAMSUNG LCD TELEVISION - DISTRIBUTION CHANNEL RELATIONSHIP AND MARKET SHARE A...SAMSUNG LCD TELEVISION - DISTRIBUTION CHANNEL RELATIONSHIP AND MARKET SHARE A...
SAMSUNG LCD TELEVISION - DISTRIBUTION CHANNEL RELATIONSHIP AND MARKET SHARE A...
 
Samsung Company Presentation
Samsung Company PresentationSamsung Company Presentation
Samsung Company Presentation
 
Marketing strategy of samsung in India
Marketing strategy of samsung in IndiaMarketing strategy of samsung in India
Marketing strategy of samsung in India
 
Tizen-based Samsung TV SDK IDE Help Guide
Tizen-based Samsung TV SDK IDE Help GuideTizen-based Samsung TV SDK IDE Help Guide
Tizen-based Samsung TV SDK IDE Help Guide
 
Samsung Smart TV Cinema Application UX Guideline
Samsung Smart TV Cinema Application UX GuidelineSamsung Smart TV Cinema Application UX Guideline
Samsung Smart TV Cinema Application UX Guideline
 
First app on Samsung Smart TV - WarsawJS Meetup #1
First app on Samsung Smart TV - WarsawJS Meetup #1First app on Samsung Smart TV - WarsawJS Meetup #1
First app on Samsung Smart TV - WarsawJS Meetup #1
 
Tizen-based Samsung TV Web Simulator
Tizen-based Samsung TV Web SimulatorTizen-based Samsung TV Web Simulator
Tizen-based Samsung TV Web Simulator
 
Developing a Google Wave Extension
Developing a Google Wave ExtensionDeveloping a Google Wave Extension
Developing a Google Wave Extension
 
Samsung IAP SDK
Samsung IAP SDKSamsung IAP SDK
Samsung IAP SDK
 
Introduction to Samsung Gear SDK
Introduction to Samsung Gear SDKIntroduction to Samsung Gear SDK
Introduction to Samsung Gear SDK
 
Multiscreen APIs from Samsung
Multiscreen APIs from SamsungMultiscreen APIs from Samsung
Multiscreen APIs from Samsung
 
Power of Internet and What Developers Can Do for the Society
Power of Internet and What Developers Can Do for the SocietyPower of Internet and What Developers Can Do for the Society
Power of Internet and What Developers Can Do for the Society
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 

Introduction to Samsung Smart TV SDK

  • 1. Samsung Smart TV SDK Manikantan K Manikantan.k@samsung.com @manikantan_k
  • 2. What is Samsung SMART TV App? • Samsung Smart TV applications are web-based small software programs that run on Digital TVs connected to the Internet. • Applications are installed on TVs via Internet and run on App Engine Application Manager App Engine
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9. Samsung D Forum Visit www.samsungdforum.com to download the latest SDK
  • 10. Smart TV SDK evolution 2.x • Designed for 2011 Devices ( D Model ) • HTML5/CSS3 Support • Maple Web Engine 3.x • Designed for 2012 Devices ( E Model ) • Smart Interaction, In-Apps Ads & Convergence Support • WebKit Web Engine 4.x • Designed for 2013 Devices ( F Model ) • Smart Interaction 2.0 Support • Eclipse Based IDE (Linux & Mac OS SDK Available) http://www.samsungdforum.com
  • 12. Improved HTML5 support • Support for <video> and <audio> tags • For formats & support, see link <video src=“movie.mp4” width=“320” height=“240”> No HTML5 video tag support. </video> http://www.samsungdforum.com/Guide/art00066/index.html
  • 13. Improved HTML5 support • Support for <canvas> tag <canvas id=“example” width=“200” height=“200”> This text is displayed if your browser does not support HTML5 canvas. </canvas> var example = document.getElementById(‘example’); var context = example.getContext(‘2d’); context.fillStyle = “rgd(255,0,0)”; context.fillRect(30,30,50,50); http://www.samsungdforum.com/Guide/art00066/index.html
  • 14. Web Device API List of APIs to access low level functionalities of the Smart TV like • • • • • • • • Network capabilities TV channels Gamepad connectivity External Camera support Microphone Filesystem Voice recognition MIDI etc <script type="text/javascript" src="$MANAGER_WIDGET/Common/webapi/1.0/webapis.js"></script>
  • 15. Web Device API > Network • Check network connection • Set Listeners for changes try { webapis.network.getAvailableNetworks(successCB, errorCB); } catch(err) { alert(err.name); } function successCB(networks) { for(var i=0; I < networks.length; i++) { if(networks[i].isActive() ) { networks[i].setWatchListener(watchCB, errCB); }} } http://www.samsungdforum.com/Guide/ref00008/network/dtv_network_module.html
  • 16. Web Device API > TVChannel • Get ProgramList for current channel try { var channel = webapis.tv.channel.getCurrentChannel(); webapis.tv.channel.getProgramList(channel, webapis.tv.info.getEpochTime(), successCB, errorCB, 3600 ); } catch(err) { alert(err.name); } function successCB(programs) { console.log(“program query success”); } http://www.samsungdforum.com/Guide/ref00008/tvchannel/dtv_tvchannel_module.htm l
  • 17. Single Handed Gestures • You need to include mouse support in config.xml <mouse>y</mouse> • Mouse listener like the web. • Create a div in scene1.html <div id="button0">Button</div> <!-- make it as button --> <div id="div0“></div> <!-- make it as trial element --> • Adding listener document.getElementById('div0').addEventListener('mouseover', function(){ document.getElementById('div0').style.backgroundColor = 'lime'; }, false); document.getElementById('div0').addEventListener('mouseout', function(){ document.getElementById('div0').style.backgroundColor = 'yellow'; }, false); document.getElementById('div0').addEventListener('click', function(){ alert("clicked"); }, false);
  • 18. Double Handed Gestures Check for support/enabled if (webapis.recognition.IsRecognitionSupported()) { if (webapis.recognition.IsGestureRecognitionEnabled()) { // perform Recognition related actions here, e.g. subscribe } else { alert("ERROR: Gesture recognition is not enabled"); } } else { alert("ERROR: Gesture recognition not supported"); } Subscribe to events webapis.recognition.SubscribeExEvent(webapis.recognition.PL_RECOGNITION_T YPE_GESTURE, “returnID", function (evt) { that.handleRecognitionEvent.call(that, evt); }); EVENT_GESTURE_2HAND_ZOOM , EVENT_GESTURE_2HAND_ROTATE etc
  • 19. Voice Recognition • Embedded Mode Predefined voice commands. The engine does more of comparison than recognition Does NOT require internet. Limited to comparing between 7 items. • Server Guide Mode Free- form speech. Depends heavily on user’s linguistics and pronunciation. Voice Data is sent to internet to recognize user’s speech. No limits.
  • 20. Voice Recognition • Add the voice tag in the config.xml – <voice>y</voice> • Include the following library in the index.html – $MANAGER_WIDGET/Common/webapi/1.0/deviceapis.js – The VR library can be used under the deviceapis.recognition object • Set Helpbar!
  • 21. Voice Recognition • Not all TV Series have VR feature, it be best to check device compatibility before using the feature. • Check Device VR Feature Availibility: – deviceapis.recognition.IsRecognitionSupported() • Check Device VR Feature Enabled or Disabled: – deviceapis.recognition.IsVoiceRecognitionEnabled() • Check Device Server Guide VR Availibility: – deviceapis.recognition.IsVoiceServerLanguageSupported()
  • 22. Voice Recognition • Since the VR runs separately with apps, the apps must subscribe to VR events to use the data from VR. deviceapis.recognition.SubscribeExEvent( deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE, "VoiceEvt", Main.onVoiceEvent ); deviceapis.recognition.UnsubscribeExEvent( deviceapis.recognition.PL_RECOGNITION_TYPE_VOICE, "VoiceEvt” );
  • 23. Built-In Emulator Virtual Box based. Can test voice and gesture input.
  • 24. Web Inspector Breakpoints, stepping and debugging support
  • 25. Automatic Test Tool Create input test sequences, schedule screen captures, record events
  • 26. Important TV vs Emulator • Performance • Viewing Distance • Usage with remote control / Interaction