Samsung / cordova-plugin-toast

Cordova plugin that provides TV Specific functionalities.
Apache License 2.0
121 stars 60 forks source link

How to test TOAST application on emulator #83

Open HelaGone opened 6 years ago

HelaGone commented 6 years ago

Hello.

Please help! Note: Developed on Mac OSX High Sierra

I just finish to develop a TOAST application which is a News channel for the major News channel in Mexico. (TELEVISA) I've been testing it on browser by following the docs in here: https://github.com/Samsung/cordova-plugin-toast/wiki/Create-Project https://github.com/Samsung/cordova-plugin-toast.

I've been able to run my application successfully with no problems at all when it comes to browser. But this application is intended to work on real devices from Orsay to Tizen platforms. So, I've followed the instructions for prepare and build for those platforms but my problem comes when I try to run my TOAST app on an emulator, say Orsay or TIZEN.

When I try to prepare my application for either Orsay or Tizen with the command "$ grunt sectv-prepare:sectv-" I always get this error:

"UnhandledPromiseRejectionWarning: TypeError: js2xmlparser is not a function".

I've tried to upgrade js2xmlparser to the latest version but still get that error.

Anyway, just for testing purposes, I've continued with the prepare and build process, and for Orsay platform, I've been able to compile the app in a .zip after ran the command "$ grunt sectv-build:sectv-orsay"

And then I've tried to run that .zip file on eclipse IDE for MAC OSX but there is no way to test it on a samsung Tv emulator. I've downloaded Virtualbox in order to run the emulator, but I got no luck.

Pease help me understand how is the process to emulate a TOAST application from the SDK as mentioned in the docs: # Run the application on target by using SDK.

Thanks in advance

NOTE: I've downloaded and intalled both SDKs: Tizen Studio and Eclipse IDE

prozanne commented 6 years ago

Hi there, please refer similar issue on grunt-cordova-sectv first. If you can't resolve that problem still doing like that, Please let me know again. https://github.com/Samsung/grunt-cordova-sectv/issues/14

Thanks.

HelaGone commented 6 years ago

Hi. Thanks for your quick response. Yesterday I'found the solution for the js2xmlparse error. After fix it I was able to prepare the application for both Orsay and Tizen platforms, but still have no clue how to test it on the emulator for neither Orsay nor Tizen.

ORSAY After build the application with grunt sectv-build:sectv-orsay I get the .zip file in /myapp/platforms/sectv-orsay/build/. I think that is ok. Now. In Eclipse IDE I was able to import the project. But still I have no idea how to run the project on an emulator.

I've downloaded the Samsung TV SDK for Legacy Platform (Emulator Image for Virtual Box) which is a .ova file. I've imported it into Virtualbox and now I have the emulator running from Virtualbox but now, I think my problem is how to launch the emulator from Eclipse IDE with my application.

Please help me how to launch application from Eclipse IDE in a Samsung TV emulator.

TIZEN After run the command for build the application for Tizen platform grunt sectv-build:sectv-tizen I get the following message from terminal:

Running "sectv-build:sectv-tizen" (sectv-build) task

Start packaging Samsung Tizen TV Platform...... Tizen CLI 2.4.50

Setting configuration is succeeded....

Build Web Application: 80% ( 8/10)There is no /holkanluna/tizen-workspace/.metadata/.plugins/org.tizen.common.sign/profiles.xml. There is no hkDevProfile. Warning: Not found tizen signature file Warning: Not found tizen author signature file Excludes File Pattern: {.manifest.tmp, .delta.lst} Fatal error: Cannot read property 'match' of undefined

I've created the hkDevProfile yesterday through TizenStudio > certificate manager. What I'm doing wrong?

Thanks in advance!

prozanne commented 6 years ago

Hi, You mean you want to launch your Toast application for each emulators. Please below guides for launching application on Emulator.

Tizen (14'~) https://developer.samsung.com/tv/develop/getting-started/using-sdk/tv-emulator/ https://developer.samsung.com/tv/develop/getting-started/setting-up-sdk/creating-certificates https://developer.samsung.com/tv/develop/getting-started/creating-tv-applications

Before Tizen(~13') https://developer.samsung.com/tv/develop/legacy-platform-library/d04/index#Run-and-Debug-App-(SDK-5.0)

Even though you can't use "build" command because of any errors, If you succeed to "prepare" command, you can just import your application on your each SDK such as the other common TV web application.

In case of your issue on Tizen, It might be a creating certification was failed. First, please check to be able to launch an new empty project, not Toast. If you have still in trouble with importing your empty application on SDK, It might not be an issue about Toast itself. I recommend to you to contact samsung developer site for asking that. https://developer.samsung.com/community

Thanks!

HelaGone commented 6 years ago

Hi. Well, I've read and followed all those links you gave me.

I've imported the TOAST project into TizenStudio successfully after grunt sectv-prepare:sectv-tizen and I've followed the instructions for run/debug the project as > Tizen Web Application in the emulator, but I get the following errors on console about missing/Not found files (cordova_plugins.js as well as the "plugins" folder).

screen shot 2018-07-10 at 11 39 51

But here https://github.com/Samsung/cordova-plugin-toast/issues/17/#issuecomment-224260470, Sue comments that those files and folders are not required on a Tizen/Orsay platforms.

Then, why the console complains of this?

Also, the console complains about toast not defined.

screen shot 2018-07-10 at 12 19 59

Let me know if I can send you my TOAST project for you to check if there are any errors or something that I've missed. I've tested this TOAST application on browser an it works as expected.

Please help us here. We are kind of stuck.

Thanks in advance.

prozanne commented 6 years ago

Ok, before you sending me an app, Please check this first. Did you add a code for adding toast.js in index.html? Please refer below guide. Even though you check it all, you've got same error Please send me an application. Then I will check it.

https://github.com/Samsung/cordova-plugin-toast/wiki/Create-Project#wwwindexhtml

Thanks.