{"id":21644487,"url":"https://github.com/samsung/cordova-plugin-toast","last_synced_at":"2025-08-21T19:31:20.582Z","repository":{"id":78613317,"uuid":"44937885","full_name":"Samsung/cordova-plugin-toast","owner":"Samsung","description":"Cordova plugin that provides TV Specific functionalities.","archived":false,"fork":false,"pushed_at":"2023-04-07T10:19:51.000Z","size":48738,"stargazers_count":122,"open_issues_count":47,"forks_count":60,"subscribers_count":21,"default_branch":"master","last_synced_at":"2024-12-09T00:41:51.539Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Samsung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-26T01:08:48.000Z","updated_at":"2024-11-19T13:27:37.000Z","dependencies_parsed_at":null,"dependency_job_id":"4439ca3d-a821-4117-9632-464ea4546a2d","html_url":"https://github.com/Samsung/cordova-plugin-toast","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fcordova-plugin-toast","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fcordova-plugin-toast/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fcordova-plugin-toast/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Samsung%2Fcordova-plugin-toast/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Samsung","download_url":"https://codeload.github.com/Samsung/cordova-plugin-toast/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230527881,"owners_count":18240052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-25T05:40:28.505Z","updated_at":"2024-12-20T03:10:56.560Z","avatar_url":"https://github.com/Samsung.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/Samsung/cordova-plugin-toast.svg?branch=master)](https://travis-ci.org/Samsung/cordova-plugin-toast)\n\n# cordova-plugin-toast\nCordova plugin that provides TV Specific functionalities.\n\n# About this project\nThis plugin defines a global `toast` object, which provides an API for TV specific functionalities that is based on [Cordova](https://cordova.apache.org/) project.\n\nAlthough the object provides the global scoped `toast` object, it is not available until after the `deviceready` event which is provided by Cordova.\n```js\ndocument.addEventListener(\"deviceready\", onDeviceReady, false);\nfunction onDeviceReady() {\n    console.log(toast);\n}\n```\n\n# TOAST references\nIf you want more details, please refer belows.\n* Guide\n    - [wiki](https://github.com/Samsung/cordova-plugin-toast/wiki).\n* Youtube\n    - [Youtube link](https://youtu.be/vv5emwgtrDc) for 2016 SDC tech session : Write Once and Run Everywhere with TOAST for Smart TV.\n* TOAST introduce video\n    - [TOAST video](http://developer.samsung.com/onlinedocs/tv/toastAD/) contains introduce for TOAST briefly. It would help you understand easily.\n\n# Project Structure\n```\n    ./\n     |-cordova-test-runner/ ... TestRunner/TestSuite Cordova application\n     |-docs/ .................. Documents which are including API Specification\n     |-sample/ ................ Sample applications using TOAST API\n     |-src/ ................... Platform dependent modules for the plugin TOAST\n     |  |-browser/ ............ Plugin implementation for the platform `browser`\n     |  |-sectv-orsay/ ........ Plugin implementation for the platform `sectv-orsay`\n     |  |-sectv-tizen/ ........ Plugin implementation for the platform `sectv-tizen`\n     |  `-tv-webos/ ........... Plugin implementation for the platform `tv-webos`\n     |-tasks/ ................. custom grunt tasks to build the toast.js\n     |-www/ ................... Platform independent modules for the plugin TOAST\n     |-Gruntfile.js ........... Gruntfile to build the toast.js\n     '-plugin.xml ............. Cordova Plugin configuration for TOAST\n```\n\n# Associated Projects\n* [cordova-sectv-orsay](http://github.com/Samsung/cordova-sectv-orsay) is an application library that allows for Cordova-based projects to be built for the Legacy Samsung Smart TV Platform.(A.K.A Orsay)\n* [cordova-sectv-tizen](http://github.com/Samsung/cordova-sectv-tizen) is an application library that allows for Cordova-based projects to be built for the Samsung Tizen TV Platform.\n* [cordova-tv-webos](http://github.com/Samsung/cordova-tv-webos) is an application library that allows for Cordova-based projects to be built for the LG WebOS TV Platform.\n* [grunt-cordova-sectv](http://github.com/Samsung/grunt-cordova-sectv) is a [grunt](http://gruntjs.com/) task to prepare and build package from a cordova project for `sectv-orsay` and `sectv-tizen` and `tv-webos` platforms.\n\n\n# Supported platform\n* browser\n* Legacy Samsung Smart TV (sectv-orsay)\n* Tizen Samsung Smart TV (sectv-tizen)\n* WebOS LG Smart TV (tv-webos)\n\n\u003ctable\u003e\n  \u003ctr align=\"center\"\u003e\n    \u003ctd rowspan=\"2\" style=\"\"\u003eFeature Name\u003c/td\u003e\n    \u003ctd rowspan=\"2\" style=\"\"\u003eBrowser\u003c/td\u003e\n    \u003ctd colspan=\"3\" style=\"\"\u003eLegacy Samsung Smart TV\u003c/td\u003e\n    \u003ctd colspan=\"2\" style=\"width:220px\"\u003eTizen Samsung Smart TV\u003c/td\u003e\n    \u003ctd colspan=\"3\" style=\"width:220px\"\u003eWebOS LG Smart TV\u003c/td\u003e\n  \u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003e2012\u003c/td\u003e\u003ctd\u003e2013\u003c/td\u003e\u003ctd\u003e2014\u003c/td\u003e\u003ctd\u003e2015\u003c/td\u003e\u003ctd\u003e2016\u003c/td\u003e\u003ctd\u003e2014\u003c/td\u003e\u003ctd\u003e2015\u003c/td\u003e\u003ctd\u003e2016\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.Media\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.MediaPlugin\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.drminfo\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.application\u003c/td\u003e\u003ctd\u003ePartly\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.inputdevice\u003c/td\u003e\u003ctd\u003ePartly\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.tvaudiocontrol\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.tvwindow\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003etoast.tvchannel\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003c/tr\u003e\n  \u003ctr align=\"center\"\u003e\u003ctd\u003eIME\u003c/td\u003e\u003ctd\u003eNo\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003ctd\u003eYes\u003c/td\u003e\u003c/tr\u003e\n \u003c/table\u003e\n\n# Prepare to start\n* [Prepare to start](https://github.com/Samsung/cordova-plugin-toast/wiki/Prepare-to-start) contains contents such as precondition, configuration or compile before using TOAST.\n\n## Precondition\nFirst, TOAST needs the followings. Please install these.\n\n* [nodejs](https://nodejs.org/)\n* [git](https://git-scm.com/)\n* [Chrome Browser](https://www.google.co.kr/chrome/browser/desktop/)\n* [Samsung Tizen SDK](http://www.samsungdforum.com/) (It is only for Tizen packaging, please refer to [grunt-cordova-sectv](https://github.com/Samsung/grunt-cordova-sectv/blob/master/README.md), [Build and package](https://github.com/Samsung/cordova-plugin-toast/wiki/Build-and-Package)\n* npm modules: cordova, grunt\n\n    ```sh\n    $ npm install -g cordova\n    $ npm install -g grunt-cli\n    ```\n\n## git clone\n* For copying repositories, please `mkdir` a root directory.\n \n    ```sh\n    $ mkdir \u003croot directory\u003e\n    ```\n\n* In the root directory, please `git clone` the following repositories.\n    \n    ```sh\n    $ git clone https://github.com/apache/cordova-js.git\n    $ git clone https://github.com/apache/cordova-browser.git\n    $ git clone https://github.com/Samsung/cordova-plugin-toast.git\n    $ git clone https://github.com/Samsung/cordova-sectv-orsay.git\n    $ git clone https://github.com/Samsung/cordova-sectv-tizen.git\n    $ git clone https://github.com/Samsung/cordova-tv-webos.git\n    $ git clone https://github.com/Samsung/grunt-cordova-sectv.git\n    ```\n\n## Configuration\n* Please `npm install` to install dependencies in `cordova-js`, `cordova-plugin-toast`, `cordova-sectv-orsay`, `cordova-sectv-tizen`, `cordova-tv-webos`, `grunt-cordova-sectv`.\n\n    ```sh\n    $ npm install\n    ```\n\n* In `cordova-js/Gruntfile.js`, please add compile tasks.\n\n    ```js\n    module.exports = function(grunt) {\n    grunt.initConfig({\n        pkg: grunt.file.readJSON('package.json'),\n        compile: {\n            ...\n            \"sectv-orsay\": {},\n            \"sectv-tizen\": {},\n            \"tv-webos\": {}\n        },\n    ```\n\n* In `cordova-js/package.json`, please add the platforms to `cordova-platforms` like below.\n\n  ```js\n  \"cordova-platforms\" : {\n        ...\n    \"cordova-sectv-orsay\"   : \"../cordova-sectv-orsay\",\n    \"cordova-sectv-tizen\"   : \"../cordova-sectv-tizen\",\n    \"cordova-tv-webos\"   : \"../cordova-tv-webos\"\n  }\n  ```\n\n## Compile\n\n* In `cordova-js`, please `grunt compile` for packaging.\n\n    ```sh\n    $ grunt compile:sectv-orsay compile:sectv-tizen compile:tv-webos\n    ```\n\n* In `cordova-plugin-toast`, please `grunt compile` for packaging.\n\n    ```sh\n    $ grunt compile:sectv-orsay compile:sectv-tizen compile:tv-webos\n    ```\n\n# Create Project\n* [Create Project](https://github.com/Samsung/cordova-plugin-toast/wiki/Create-Project) contains how to create TOAST Project step by step.\n\n## How to create Toast project\n\n* recommended workspace\n\n   ```\n  ./\n     |-cordova-js/ ............\n     |-cordova-browser/ .......\n     |-cordova-plugin-toast/ ..\n     |-cordova-sectv-orsay/ ...\n     |-cordova-sectv-tizen/ ...\n     |-cordova-tv-webos/ ......\n     `-grunt-cordova-sectv/ ...\n   ```\n\n* create empty project\n\n    ```sh\n    # Create cordova project\n    $ cordova create TestApp\n    $ cd TestApp\n\n    # Beware of hidden file\n    $ cp -rf ../grunt-cordova-sectv/sample/. ./\n    $ npm install ../grunt-cordova-sectv\n    # Grunt task for build and package\n\n    # Install dependency modules\n    $ npm install\n\n    # For toast browser simulator\n    $ cordova platform add browser\n\n    # Mandatory plugins for using browser simulator (not for other platforms)\n    $ cordova plugin add cordova-plugin-device\n    $ cordova plugin add cordova-plugin-network-information\n    $ cordova plugin add cordova-plugin-globalization\n\n    # Add toast plugin\n    $ cordova plugin add ../cordova-plugin-toast\n    ```\n\n* www/index.html\n\n    ```HTML\n\u003c!-- REMOVE meta tag for setting CSP(Content-Security-Policy)\n    \u003cmeta http-equiv=\"Content-Security-Policy\" content=\"default-src 'self' data: gap: https://ssl.gstatic.com 'unsafe-eval'; style-src 'self' 'unsafe-inline'; media-src *\"\u003e\n--\u003e\n\n\u003c!-- Please add below script tags to body tag (not head tag) --\u003e\n    \u003cbody\u003e\n        ...\n        \u003cscript type=\"text/javascript\" src=\"cordova.js\"\u003e\u003c/script\u003e\n        \n        \u003c!-- Add toast.js to use toast api --\u003e\n        \u003cscript type=\"text/javascript\" src=\"toast.js\"\u003e\u003c/script\u003e\n        ...\n    \u003c/body\u003e\n    ```\n\n# Prepare and Build\n* [Prepare and Build](https://github.com/Samsung/cordova-plugin-toast/wiki/Prepare-and-Build) contains how to prepare and build TOAST project for each platforms.\n\"Prepare\" task could help to compose necessary components of TOAST project for each platforms.\n\"Build\" task could help to package TOAST project as format for each platforms.\n\n## How to prepare\n* browser\n\n    ```sh\n    $ cordova build browser\n    ```\n* sectv-orsay\n\n    ```sh\n    $ grunt sectv-prepare:sectv-orsay\n    ```\n* sectv-tizen\n\n    ```sh\n    $ grunt sectv-prepare:sectv-tizen\n    ```\n* tv-webos\n\n    ```sh\n    $ grunt sectv-prepare:tv-webos\n    ```    \n\n## How to build and package\n* browser\n\n    ```sh\n    # Test on browser platform\n    $ cordova emulate browser\n    ```\n* sectv-orsay\n    \n    ```sh\n    # Test on sectv-orsay platform\n    $ grunt sectv-build:sectv-orsay\n    # Run the application on target by using SDK\n    ```\n* sectv-tizen\n\n    ```sh\n    # Test on sectv-tizen platform\n    $ grunt sectv-build:sectv-tizen\n    # Run the application on target by using SDK\n    ```\n* tv-webos\n\n    ```sh\n    # Test on tv-webos platform\n    $ grunt sectv-build:tv-webos\n    # Run the application on target by using SDK\n    ```    \n\n* For more details, please refer the [tizen package](https://github.com/Samsung/grunt-cordova-sectv/blob/master/README.md#how-to-build-and-package-the-application-by-platforms)\n\n# How to Test with TestRunner\n* You can test on each platforms with Test Runner cordova application which is located at 'cordova-test-runner' directory of this project.\n* Please refer to below for running the tests: (Assuming that the [grunt-cordova-sectv](http://github.com/Samsung/grunt-cordova-sectv) project is cloned at the same level with this project)\n\n    ```sh\n    # Create cordova project\n    $ cordova create TestRunner --template=cordova-plugin-toast/cordova-test-runner\n    $ cd TestRunner\n\n    # Beware of hidden file\n    $ cp -rf ../grunt-cordova-sectv/sample/. ./\n    $ npm install ../grunt-cordova-sectv\n    # Grunt task for build and package\n\n    # Install dependency modules\n    $ npm install\n\n    # For toast browser simulator\n    $ cordova platform add browser\n\n    # Mandatory plugins for using browser simulator (not for other platforms)\n    $ cordova plugin add cordova-plugin-device\n    $ cordova plugin add cordova-plugin-network-information\n    $ cordova plugin add cordova-plugin-globalization\n\n    # Add toast plugin\n    $ cordova plugin add ../cordova-plugin-toast\n    ```\n\n# Converting Tizen to Toast\n* [Converting Tizen to Toast](https://github.com/Samsung/cordova-plugin-toast/wiki/Prepare-to-convert-for-Tizen) contains how to convert application which is made with Tizen to TOAST.\n\n# Converting Orsay to Toast\n* [Converting Orsay to Toast](https://github.com/Samsung/cordova-plugin-toast/wiki/Prepare-to-convert-for-Legacy%20(A.K.A.%20Orsay)) contains how to convert application which is made with Orsay to TOAST.\n\n# API Reference\n* [toast.Media](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.Media.md)\n* [toast.MediaPlugin](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.MediaPlugin.md)\n* [toast.drminfo](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.drminfo.md)\n* [toast.application](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.application.md)\n* [toast.inputdevice](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.inputdevice.md)\n* [toast.tvaudiocontrol](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.tvaudiocontrol.md)\n* [toast.tvwindow](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.tvwindow.md)\n* [toast.tvchannel](https://github.com/Samsung/cordova-plugin-toast/blob/master/docs/toast.tvchannel.md)\n\n# Sample App\n* [Media](https://github.com/Samsung/cordova-plugin-toast/tree/master/sample/media)\n* [drmmedia](https://github.com/Samsung/cordova-plugin-toast/tree/master/sample/drmmedia)\n* [ime](https://github.com/Samsung/cordova-plugin-toast/tree/master/sample/ime)\n* [tvwindow](https://github.com/Samsung/cordova-plugin-toast/tree/master/sample/tvwindow)\n* [deviceinfo](https://github.com/Samsung/cordova-plugin-toast/tree/master/sample/deviceinfo)\n\n# Contribution Guideline\n* [Contribution Guideline](https://github.com/Samsung/cordova-plugin-toast/wiki/contribution-guideline) contains several tips to participate in contribution.\n\n# Known Issues\nNot yet\n\n[![Analytics](https://ga-beacon.appspot.com/UA-70262254-1/cordova-plugin-toast/README)](https://github.com/igrigorik/ga-beacon)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Fcordova-plugin-toast","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamsung%2Fcordova-plugin-toast","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamsung%2Fcordova-plugin-toast/lists"}