Webkit support for local storage on Samsung TV browser - html

I'm porting a HTML-based app to a Samsung smart TV. The app uses local storage to keep preferences, etc.. Local storage appears to be supported and data is persistent while the browser is open. But, once the browser is exited ... poof! the data is gone. Other data like sessions and cookies do persist.
I use the Lawnchair library in the app and have also tested using jStorage. Neither persist beyond closing of the browser.
The browser (or browser component) on the TV is webkit build 534.7. From playing with the browser, I suspect it is actually written in Adobe Air.
I have also tested the Air browser component on my PC, which is build 533.19.4 of webkit. This doesn't appear to support local storage at all.
Chrome on my PC, build 535.19 of webkit, works fine in all my tests.
So, where does the blame lie here: is it the webkit build, the implementation of webkit in Adobe Air, or the TV? Can anyone offer a fix or a suggestion for work around?
Thanks.

Unfortunately I don't have 2012 model so I can't check if the HTML5 localStorage is working or not.
But I have workaround for you which will be backward compatible with previous TV sets' models also, as 2010 and 2011 models use Maple browser:
http://www.samsungdforum.com/Guide/View/Developer_Documentation/Samsung_SmartTV_Developer_Documentation_3.1/API_Reference/JavaScript_APIs/File_API
Serialize your data object
Save it using File API to application directory
And every time you open the app open this file and unserialize data.
This will work for sure!

1- you an use file api
2- you can set a cookie
I was once trying to save preferences of my app and using cookies seemed easier.
I don't know much about html5 but in TV's you should check which features allowed. Most of the smart tv's are giving partial support to html5.

Related

Framework7 offline app cross origin blocked on IE & Chrome. Is there a simple local server solution as an alternative?

I am currently building an app using the Wordpress API and Framework7 that is solely intended for offline use. The offline app works perfectly in safari with local file restrictions disabled, however I understand a similar option is not available in IE or Chrome.
Unfortunately for me, the project is being developed exclusively for surface pro, so it has to work in IE.
This being the case, are there any alternative solutions in which I can quickly and smoothly serve the local files as a local server? Ideally avoiding the use of the command line and/or MAMP/XAMPP.
Found that tinyweb offered a solution that was almost perfect, however the local files were all 403 forbidden when loaded up.
Any suggestions would be welcome.
You can evaluate to encase your app in a Cordova app for Windows.
Or, if it suits your needs, a quick and dirty solution is pkg.

Google map integration problem: you seem to be using an unsupported browser

When we want to integrate Google map in windows application by using C# it gives the following errors when we run the application
error : you seem to be using an unsupported browser
Based from this forum, it seems that there is/are one or more addons or extension which is not allowing map to load. You can try to check one by one. Maybe it updated and broke maps.
You can also check this SO question which states that maybe the WebBrowser control is emulating an older version of Internet Explorer on your machine.
By default, this feature is enabled for Windows Internet Explorer and for applications hosting the WebBrowser Control. To disable this feature by using the registry, add the name of your executable file to the following setting.
Hope this helps!
You can consider a different web browser embedded control. For example, you can look at Chromium Embedded Framework.
https://en.wikipedia.org/wiki/Chromium_Embedded_Framework
I believe it should work pretty well. According to the documentation this framework embeds a Chromium browser (open-source web browser closely related to the Google Chrome browser) which uses the modern HTML5 and V8 JavaScript engine.

Running HTML5 code in android app without internet connectivity?

Is it possible to have HTML5 files stored inside the .apk file of an android app and run the files on the android app without requiring internet connectivity?
Yes. If your a native Android programmer look at the WebView. http://developer.android.com/reference/android/webkit/WebView.html
If your not, you could look at things like http://cordova.apache.org/ and http://www.appcelerator.com/platform/titanium-sdk/ and others. But honestly I've never meet a dev who has a good thing to say about these for any kind of complex app.

Get a stream from client microphone via web browser?

I want to implement something like voip communication that client doesn't need to install additional application, they just open the webpage and talk to a server. Is there anyway to access the audio stream from client microphone via web browser ? I don't want additional plugin like applet that user have to install.
I think flash can do this, but is there anyway else ?
Thank you,
Voteforpedro
Your four main options are:
Flash
Silverlight
ActiveX
Unsecure browser settings (e.g. javascript calling EXEs)
All of the above will be subject to various security limitations or require some acceptance by the end-user. I'm not even certain that the browser calling out to EXEs is even possible any more so it should be avoided at all costs.
Installing an ActiveX control will limit you to IE on Windows, so should probably be avoided. The user would have to agree to installing the ActiveX anyway.
Both Flash and Silverlight are cross-platform (Flash more so than Silverlight) but also require the user to agree to access to the Microphone/Webcam - this is done by the framework, not something you can control/influence. Obviously, if the user does not have Flash or Silverlight installed, you'd need to prompt the user that they need to install it!
As stated by #Oded, there are serious security and privacy issues related to microphone's and webcams, so do not expect future browsers to make this easier for you (e.g. the new family of HTML5 browsers).
There is no standard, I think flash is your best bet.
AS 3.0 Accessing a microphone.
There is no standard that gives you access to the client machine microphone.
I can imagine there are security implication to giving a browser such access, so don't expect to see anything soon, not without some sort of plug-in.
Chrome 11+ supports access to the microphone. Visit this page (with Google Chrome) and click on "Speech" and try it out. This is using Sencha Ext/Touch which is an open library. This specific addon to Sencha Touch is also open source and released here.
Edit: To clarify, this is JavaScript only. The user doesn't need to approve anything. But, it only works in Chrome and it uses Google voice recognition.
Good luck!

complete client side application using HTML 5

Is it possible to create a complete client side application using HTML 5 (it will embed chat clients, stock ticker) + JavaScript, and then bundle is with underlining Firefox 3.5 engine, so that user can install it as a desktop app on Linux, and then it runs in its own window using firefox 3.5 engine. The app will store everything in local storage - like url, usernames etc, and will not interact with any local server.
It would pure HTML5 + JavaScript based client web app which would be packaged, and can be installed or launched from startup scripts.
Or instead of using firefox 3.5 engine, we can use Mozilla Prism to convert it to web app, and then bundle it.
Well, you should take a look at xulrunner (https://developer.mozilla.org/En/XULRunner). This is an engine to build portable applications... like firefox. You are getting full Gecko engine + full access to the environment, like a plain application. (XUL is something similar to HTML -- it is still XML-based UI description -- but it is better suited to develop desktop applications -- using native/almost native UI).
It sounds like what you're trying to do can be done with Adobe AIR (though there is no HTML5 support yet). Adobe AIR apps can be written with just HTML and JavaScript, though AIR uses the WebKit engine, not FireFox's.
The app part is surely doable (and will work just about everywhere, not just Linux), the bundling appears to be the more problematic part -- not every distro of Linux will like the specific way you built the bundled Firefox, not to mention that you're cutting yourself off from just about any non-Linux box on the planet (and every linux box with a non-x86 compatible processor, etc, etc)... all for the sake of that bundling. Can't you stop at the prism aka webrunner part, without bundling?
I'm almost sure I've seen something like this done with Qt Webkit. It was only a few lines of C++ to create the window with the web browser control and load a local page. The page created the UI of the application. I can't find the link though.
I second what liori said about using XULRunner. You can deploy your HTML application easily, and, more importantly, when you run into limitations of HTML 5 or its level of support in Gecko, you can work around it by using XUL APIs.
(AFAIK, Firefox 3.5 doesn't support any socket APIs in HTML content, and it doesn't support offline storage in web apps, only the localStorage part).