Somehow access Android body sensor from a web page? - javascript

I'd like to create a web page which can access a body sensor on an Android tablet (to detect if someone is standing in front of the tablet).
I'd love to do this with a web page (an actual web page, not a PhoneGap/Cordova app). I've seen demos of accessing the webcam from a web page via HTML5/JS in Opera. I'd love to do the same with a body sensor.
Is there ANY way to achieve this? I'm okay with using a browser plugin if necessary or even a customed Android browser (that supports HTML5/CSS3).
Alternatively, is this even possible with PhoneGap/Cordova?

Related

From a web application (Javascript running on browser), Is it possible to detect if any external device is connected through HDMI?

We are developing a video streaming website and have a business requirement to stop playback, if any external display (e.g. TV) is connected to the PC through HDMI.
Is it possible to check this in javascript?
I tried using Presentation API and Remote Playback API supported on browsers, but they seem to work only for "casting" and not for simple media "mirroring" through HDMI.
The w3c spec however specifies that the Presentation API is meant for 1-UA (User Agent) mode as well (simple mirroring through HDMI).
Somehow I am not able to use Presentation API to check if any display device is connected through HDMI or not.
Can anyone help me out with my query?

Capture web page data using native language code

I'm looking for leads on how to capture web page metadata from the current browser page. I want to create a feature in my application that will allow the user to press a hot key and record meta data from the web page currently open in the user's browser. My application will be running minimized, this feature is to be activated by a global hot key.
I'm using nw.js (formerly Node-Webkit) to create this application, so ideally, the solution would be javascript running in a desktop installation of Node.js. If this is not practical, I understand that I can call platform specific code from nw.js, so solutions developed in any desktop os language would be of interest.
My application targets OS X and Windows.
I'm hoping to capture metadata from all major modern browsers (Chrome, Firefox, Safari and IE 10+).
At a minimum I need to capture the page url, but I also want to capture Keywords, Description and highlighted text for the source web page.
I need to implement this function without modifying the source webpage in any way, and I prefer to avoid the need for browser extensions, bookmarklets or plugins.
If a solution exists using a remote controlled browser extension (no user interaction) that would be of interest, but ideally I want to avoid requiring the end user to install or interact with anything but my application.
My search to date has located no information on reading web page information from applications outside the browser.
Any thoughts or leads are much appreciated.

Stereoscopic(side by side) mobile web app

Have little experience with mobile web apps, but want to create an almost stereoscopic image(identical side by side images) of a site (192.168.2.87:8080/jsfs.html). Does anyone know if this is possible with a mobile web app?
In context, it's a video feed using javascript from IP Webcam for Android, and the video is actually rendered in the browser itself by putting together still shots.

Build html5 javascript only using file :// uri protocol page for mobiles

I don't know if I googled it correctly but I could not find the answer for my question.
I'd like to know if it's possible to code a html5 with javascript (maybe jquery mobile for the UI) and css without using "native compilers/builders" like sencha touch or phonegap and store the page locally (using file:// protocol).
E.g: Let's say that I want to build a simple HTML5 calculator. I don't want any server-side processing, I just want some html buttons to call javascript functions to perform client side only operations. If I make such page, let's call it calc.html and download it to the mobile (via usb/http download), can I open this calc.html with the internal browser and use the calculator? Or do I have to compile/build this calc.html into a Webview (for Android) or something like it to get it done?
Would this work for Android, IPhone, Windows Phone and others with localStorage/sessionStorage?
You want an Offline Web Application.
This article seems to explains step by step how to do this.
http://diveintohtml5.info/offline.html
Creating a website like this, will allow you to bookmark it and have a shortcut icon in the phone's dashboard that will allow you to load your page in the browser for those cases where you don't have a data connection. In the case where the phone has a data connection, it will load the manifest to check if there are any new files to update the application. I don't think there is a way to make it truly offline though.

Launch mobile Safari from UIWebView *without* modifying app source?

I'm developing a small site that will only be viewed in-app inside a UIWebView, and one page has several links to an external website. I'd like these to open in mobile Safari, but all links inside the app load within the webview. Modifying the source of the app isn't an option since the site needs to be live before any changes could be submitted.
Is there a way to force a link inside a UIWebView to launch mobile Safari using HTML/5 or Javascript? Mimic shouldStartLoadWithRequest? Sneaky, hacky workarounds or brilliant alternate solutions?
(And, out of sheer curiosity... why not?)
It would be bad design to let sites access the frameworks on the iPhone via simple HTML. This would open up all sorts of security holes. Its not web behavior you want to alter, so I think you may need to change the app source. I still don't understand why that isn't an option. Could you go into more depth?
One option would be to add a custom URL handler. Your website could then determine if the "broswer" is the app and serve custom URLs for those links you'd like to maintain (aka open) in your app. Then, any standard HTTP/s URLs would open in Mobile Safari.
In other words, have your web server provide urls like myappurl:// for the links you'd like your app to handle, and http:// which would open Mobile Safari.

Categories