Giter Site home page Giter Site logo

preview's Introduction

Preview Sample Application

It is a sample application with Preview.

Supported platforms

  • Samsung Tizen TV 2016 models
  • Samsung Tizen TV SDK 2.3.1 version

In JSON

Please check this sample JSON

In config.xml

Please check following things

<tizen:metadata key="http://samsung.com/tv/metadata/use.preview" value="endpoint_URL=https://www.samsungdforum.com/Preview/sampleJSON.json"/>
<tizen:app-control>
<tizen:src name="index.html" reload="disable"/>
<tizen:operation name="http://samsung.com/appcontrol/operation/eden_resume"/>
</tizen:app-control>
<tizen:application ... required_version='2.3'/>
<tizen:metadata key='http://samsung.com/tv/metadata/devel.api.version' value='2.4'/>

In JS

function deepLink() {
    var requestedAppControl = tizen.application.getCurrentApplication().getRequestedAppControl();
    var appControlData;
    var actionData;

    var videoIdx;
    var pictureIdx;

    if (requestedAppControl) {
        appControlData = requestedAppControl.appControl.data;
        
        for (var i = 0; i < appControlData.length; i++) {
            if (appControlData[i].key == 'PAYLOAD') {
                actionData = JSON.parse(appControlData[i].value[0]).values;

                if(JSON.parse(actionData).videoIdx) {
                    videoIdx = JSON.parse(actionData).videoIdx

                    console.log(videoIdx);
                }
                else if(JSON.parse(actionData).pictureIdx) {
                    pictureIdx = JSON.parse(actionData).pictureIdx

                    console.log(pictureIdx);
                }
            }
        }
    } else {
        console.log("no req app control");
    }
}
window.addEventListener('appcontrol', deepLink);

SDF guide

SDF Guide

preview's People

Contributors

prozanne avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.