Run Cordova/Phonegap based app on Samsung Smart TV - javascript

I have an app that is developed based on Cordova/Phonegap. It's purely in Javascript, HTML5 and CSS3. I am able to do small modifications to the present code and was able to run on mobile and Android TV. However, now, I want to run this app on samsung smart TV. I am ready to little modifications to make it run on Samsung TV. In the future, I also want to run it on Philips, LG smart TV's as well.
However, what I don't know is, what to modify? Is there any documentation available from Samsung, Philips and LG on how to port Cordova/Phonegap based apps on to TV? If so please share the knowledge.

Please go though samsungdforum, there you will have all the info regarding how to start app development for Samsung smart TV, I will suggest download an sample app, look into its code and understand it, then try to modify your code accordingly.

Related

Why my project doesn't find some images when downloading it as a progressive web app in a mobile phone?

I'm working on a test project to start learning about service workers and progressive web apps.
This project is hosted on github in https://github.com/Pablo-No/Privado1, however, when I download it as a progressive web app in a mobile phone some images aren't loaded correctly and alt text is shown instead, I don't know how to fix it, probably because I don't know how service workers and progresive web apps work, and that's why I'm working on this project.
In my computer it works perfectly, even when the app is downloaded without connection to internet (thanks to the service worker, I think). I've seen some similar issues, but I think they're different, however I may not be correct and I'm sorry if this issue has been answered yet.
I've used Chrome and Chrome mobile with the desktop and the mobile phone (the mobile phone uses android).
Actually I've made it works properly by using code in https://codelabs.developers.google.com/codelabs/your-first-pwapp . I hope this question and answer helps other people if they have the same issue.

Web App runs inside Webview and installed like a native App

I created a Web App(PWA) via React and Bootstrap. It runs perfectly. I planned to create an Android and another iOS Apps that have only one page with a Webview that loads my Web App via URL and ship those Apps to the customer.
My question is that there is a better and standard way to this? I heard about Hybrid Frameworks like IONIC but as I understand, IONIC Apps, Are web Apps that run on device not loaded from a URL, Is that right?
What I want is that my changes in the server affect all users and Apps installed on their devices. Because of that, I created the PWA App, not the Native App. I searched a lot but I can't reach a final decision.
Used to be I was an Android developer and had a lot of problems with shipping the latest version to the customer, Now I want to use Web-based technologies to reach Apps that works like a website.
The issue here is: you will not be able to use the devices resources if you load the PWA in a Webview. For example push notifications will not work. A PWA can be installed onto a phone and windows as an application. This will have push notification on Android and Windows but not on Mac or iOS (Safari is the new IE). You need to go Hybrid or back to Native if you need more.
You are right with IONIC. It is a wrapper for a webapp stored on the device but it allows us to use native features (push works on both Android and iOS). But you still have the distribution issue since you need to publish to the stores every version. Not even mentioning the hoops apple gets you through when you try to publish.
The good thing with IONIC is you have a single source code for multiple platforms and you can choose the library you want to build with. It used to be Angular but now you can choose ReactJS, Vue, Angular or ES. Which makes it way friendlier.
With IONIC you could build the native features and lazy load the rest as dynamic component from a url: stackoverflow question if you do not care about backward compatibility.
I did both PWA and IONIC. Both has their pros and cons.
If I do not care about iOS and Apple I would stay with PWA otherwise IONIC.

How can I troubleshoot my website on a Smart TV browser?

We bought a Samsung Smart TV to mount on the wall and display our company dashboard. I wrote the dashboard in HTML/Javascript/CSS and everything is going well. It's to a point that I felt comfortable displaying it on the big screen. However most of the data does not load. I have no idea how to access a console of any type. I've tried changing my agent string to match in Chrome dev tools, but of course that doesn't emulate capabilities. I also downloaded the "2014 Smart TV Emulator 5.1" from Samsung's site and got it running in VirtualBox but as far as I can tell you can only use it to debug and emulate native Tizen apps. I can't figure out how to launch the browser on the emulated set.
So, how can I troubleshoot my web app on a Smart TV Browser?
If you are using Tizen SDK/ Tizen Studio you can debug Tizen web application:
Run As > Tizen Web Simulator Application (Samsung TV)
Click on Web Inspector.
You can see your console here.

Mobile Web application running when screen is off?

I'm considering building a mobile Web application, using Jquery Mobile that will be used to track truck delivery.
I want to be able to periodically send gps coordinates back to the server? Can this be done if the screen is off?
If not can some alternate approaches be suggested..
If you are good in javascript and html you can go for phonegap. this framework will work like a native application and running from webview like browser. Since phonegap is a cross platform framework you can make your app compatible to many devices like windows phone, Apple, Android. To know more about phonegap or cordova click here
And yes phonegap does many function or features that can customize your application in many way. for example "WAKE LOCK" which keeps your application awake till you force close it.
or if you are using browser you can not run your code for long since browser is a big application android or your mobile system will close it.

Using JavaScript in my web app to delete files on the user's smart phone

I'm a software developer from Germany and I have a special problem concerning smart phones, websites and security!
My web application - which is optimized for smart phones - allowes it to upload photo files (made by the smart phone camera) up to our webserver.
(I use the regular HTML File Control.)
It works fine!
But now we think about possibilities to delete the uploaded photos on the smart phone - via the web app!
Is there any chance to realize that?
Our users work with Firefox 17.0 for Android.
Maybe Mozilla offers proprietary JavaScript code to get access to the local smart phone devices ... ?
Or is there any possibility to change the local security settings of Firefox Mobile?
If both solutions can't be realized, could I develop a smart phone app (which is locally installed) that deletes the photos on the phone? I'm sure I could!
But then I need a possibility to start the app using my website code.
So I have the same security problem - I think so ... again I need a way to "leave" my website to get access to local devices via JavaScript or something else (to start the installed app on the phone).
Is there anybody who has an idea?
Thanks in advance.
Thomas

Categories