cordova-plugin-toast | Cordova plugin that provides TV Specific | Mobile Application library
kandi X-RAY | cordova-plugin-toast Summary
kandi X-RAY | cordova-plugin-toast Summary
This plugin defines a global toast object, which provides an API for TV specific functionalities that is based on Cordova project. Although the object provides the global scoped toast object, it is not available until after the deviceready event which is provided by Cordova.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of cordova-plugin-toast
cordova-plugin-toast Key Features
cordova-plugin-toast Examples and Code Snippets
Community Discussions
Trending Discussions on cordova-plugin-toast
QUESTION
I have to develop a Smart TV application which needs to have the following components:
- Sign in page
- Retrieve data from external server
- Viewing webpages
- Preferably be developed with one code base
Now, Samsung does provide the possibility to develop a Smart TV application for both Samsung Tizen, Samsung Legacy and LG webOS with one code base by using TOAST. This sounds perfect for me, but the thing is that the last change to TOAST has been made 2 years ago.
Does someone advise against using TOAST and advise using the offical SDKs? Or is it still 'safe' to use TOAST? I asked the same question on the Samsung Developer forum and on Github, but haven't received an answer so far and couldn't find anything about it on the web. I've also mailed Samsung, but did not get a reply back.
...ANSWER
Answered 2019-May-27 at 09:36Samsung has very poor dev support. Their dev forums are awful and one-on-one support requests may lay dormant in the dashboard for indefinite amount of time. That's not an opinion but a fact.
Now if you plan to support Samsung Legacy and LG webOS then you better go with TOAST (not that I used it for anything), this way you might be sure that whatever you come up with will work there. Otherwise you can simply develop using any kind of framework that can be transpiled (through Babel) later to something that legacy browsers (and WebViews) are able to understand. That's what I did.
QUESTION
I create an application for smart tvs with TOAST project. During the development I test everything with tizen emulator and tizen studio and everything was fine.
After finishing development I tried to run the application on both orsay TV and orsay emulator and unfortunatly there was a lots of issue in that platform. I fixed some issues in design but I can't fix the main issue.
When I run the application, There is a line in console that say : deviceready has not fired after 5 seconds
. And I can't use any of the TOAST api functionalities.
I create an empty project and do exactly what this page say: https://github.com/Samsung/cordova-plugin-toast#prepare-to-start
But again I got the same error. Please help me.
Here is the log:
cordova/platform: orsay bootstrap BEGIN cordova.js:1365
adding proxy for NetworkStatus cordova.js:887
adding proxy for Console cordova.js:887
adding proxy for Device cordova.js:887
adding proxy for Globalization cordova.js:887
cordova/platform: orsay bootstrap END cordova.js:1460
adding proxy for toast.inputdevice cordova.js:1880
return Window cordova.js:1880
adding proxy for toast.tvwindow cordova.js:1880
return Window cordova.js:1880
adding proxy for toast.tvchannel cordova.js:1880
adding proxy for toast.tvaudiocontrol cordova.js:1880
adding proxy for toast.drminfo cordova.js:1880
adding proxy for toast.application cordova.js:1880
adding proxy for toast.Media cordova.js:1880
Failed to load resource: fail to read a resource form decryptied file file:///home/smarttv/Apps/xThreeApp/cordova_plugins.js
deviceready has not fired after 5 seconds. cordova.js:1880
Channel not fired: onNativeReady cordova.js:1880
Channel not fired: onCordovaReady cordova.js:1880
Channel not fired: onCordovaConnectionReady cordova.js:1880
Channel not fired: onCordovaInfoReady cordova.js:1880
UPDATE:
Ok I just find out two things:
- when I run the application on the emulator with
Debug As/Samsung Smart Tv Emulator
thedevicereaday
won't fired but if I close the app in the emulator and and open it again from the app page in emulator, thedeviceready
event will work perfect - Even with the above trick, when I navigate to the second page,
deviceready
again won't fire! (Even I tried to navigate to the current page but second attamp will fail to fire thedeviceready
event)
I tried lots of method to navigating to the second page but all have the same result. (I use methods like window.location.href = url;
and window.location.replace(url);
and ...)
ANSWER
Answered 2018-Oct-01 at 07:51OK I answer to myself, It was a bug in cordova.js
To fix this issue, you can change the bootstrap function to the following source code in cordova.js:
QUESTION
i created a simple cordova plugin (toast popup) for testing purposes.
The problem comes when i want to add it into a Cordova App to test my plugin : i use cordova plugin add *path_of_plugin*
while i am inside the cordova app where i want to test the plugin.
Screenshot :
(Red : folder of cordova app / Blue : path to my custom cordova plugin)
What am i doing wrong ?
EDIT : tried ..\cordova-plugin-toast
as path of the plugin, stil same errors and not working
ANSWER
Answered 2018-Feb-26 at 21:08I found the solution, the path for the plugin which was in the same folder as the app is : ..\name_of_plugin
so navigate to your cordova project then :
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install cordova-plugin-toast
For more details, please refer the tizen package.
browser # Test on browser platform $ cordova emulate browser
sectv-orsay # Test on sectv-orsay platform $ grunt sectv-build:sectv-orsay # Run the application on target by using SDK
sectv-tizen # Test on sectv-tizen platform $ grunt sectv-build:sectv-tizen # Run the application on target by using SDK
tv-webos # Test on tv-webos platform $ grunt sectv-build:tv-webos # Run the application on target by using SDK
For more details, please refer the tizen package
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page