-
Notifications
You must be signed in to change notification settings - Fork 60
supported cordova plugin
- browser
- sectv-orsay (sectv-orsay)
- sectv-tizen (sectv-tizen)
- tv-webos (tv-webos)
There are 3 cordova plugins which are supported on TOAST
- cordova-plugin-device
- cordova-plugin-globalization
- cordova-plugin-network-information
Please note that device plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-device
This plugin defines a global device
object, which describes the device's hardware and software. Although the object is in the global scope, it is not available until after the deviceready
event.
document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
console.log(JSON.stringify(device));
}
- device.cordova
- Cordova version
- device.platform
- 'sectv-tizen', 'sectv-orsay', 'tv-webos'
- device.model
- Device modelCode
- device.version
- Firmware version
- device.uuid
- device unique id
- device.manufacturer
- 'Samsung Tizen TV', 'Samsung Orsay TV', 'LG Webos TV'
Please note that globalization plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-globalization
This function retrieves language.
-
Parameters
- successCallback: The method to call when a list of supported keys are retrieved successfully.
- errorCallback: The method to invoke when an error occurs.
-
Return value N/A
-
Examples
navigator.globalization.getPreferredLanguage(function (language) { console.log('language : ' + language.value); }, function (e) { console.log('Error getting language : ' + e.message);} );
This function retrieves locale name.
-
Parameters
- successCallback: The method to call when a list of supported keys are retrieved successfully.
- errorCallback: The method to invoke when an error occurs.
-
Return value N/A
-
Examples
navigator.globalization.getLocaleName(function (locale) { console.log('locale: ' + locale.value); }, function (e) { console.log('Error getting locale : ' + e.message);} );
Please note that network-information plugin is based on cordova spec. If you want get more details for usage, refer cordova-plugin-network-information
- connection.type
- Connection.UNKNOWN
- Connection.ETHERNET
- Connection.WIFI
- Connection.CELL_2G
- Connection.CELL_3G
- Connection.CELL_4G
- Connection.CELL
- Connection.NONE
This event fires when an application goes online, and the device becomes connected to the Internet.
-
Examples
document.addEventListener("online", onOnline, false); function onOnline() { // Handle the online event var networkState = navigator.connection.type; if (networkState !== Connection.NONE) { // TODO } console.log('Connection type: ' + networkState); }
The event fires when an application goes offline, and the device is not connected to the Internet.
-
Examples
document.addEventListener("offline", onOffline, false); function onOffline() { // Handle the offline event }
None
uuuu
Getting Started
Converting Tizen to Toast
- Prepare to convert
- Tizen API: AVPlay
- Tizen API: DrmInfo(Deprecated)
- Tizen API: Application
- Tizen API: TVInputDevice
- Tizen API: TVAudioControl
- Tizen API: TVWindow
- Tizen API: TVChannel
- Tizen API: IME
- Tizen API: ProductInfo
- Tizen API: Network
- How to detect platform
Converting Legacy to Toast
- Prepare to convert
- Legacy API: AVPlay
- Legacy API: TVInfo
- Legacy API: Common
- Legacy API: InputDevice
- Legacy API: AudioControl
- Legacy API: TVWindow
- Legacy API: TVChannel
- Legacy API: IME
- How to detect platform
API Reference
- supported cordova plugin
- toast.Media
- toast.MediaPlugin
- toast.drminfo(Deprecated)
- toast.application
- toast.inputdevice
- toast.tvaudiocontrol
- toast.tvwindow
- toast.tvchannel
- toast.billing
Supported platforms
Sample App
Contribution
Frequently Asked Questions