Accessing camera in phone for iOS and Android using HTML5 - android

I need to create a photobooth mobile application and decided to use HTML5 to work on my mobile application. Currently, I am using the getUserMedia method which works perfectly well on my laptop webcam. However when I tried to test it out on my phone as an mobile application, it could not work and all it shows is a video icon. Which leads me to find out that getUserMedia does not support in Android Browser.
I would still like to continue using HTML5 to get my photobooth mobile application working but how can I access the camera in my phone and is it possible to do it?

As you can see on "Can I use" the getUserMedia isn't yet available on most mobile browsers. The latest Chrome for Android should support it though.
Using <input type="file" accept="image/*;capture=camera"> seems to work on most modern mobile browsers.

Related

Embedded youtube playback in Crosswalk XWalkView

I am using Crosswalk to develop a HTML5 app. Now i have a problem with playback of embedded youtube videos within the website. I have the same issue testing the website in Chrome browser. There is no issue testing in Dolphin Browser or android default browser (< Android 4.3).
I had the problem in the past also with default android browser, but i can enable playback by setting user-agent to desktop browser. That doesn't work for the crosswalk browser.
If i run the app not on a smartphone but on a tablet it works, also in Chrome with default settings.
Does anybody has an idea/solution to enable video playback on smartphone?
Thank You!
Solved. Google's intention was, that every Android Smartphone would have installed the same basic codecs.
It seems that not every manufactor of cheap Android Smartphone (from China in this case) meets these requirements (even if Play Store is installed).
There is a way to display installed codecs on smartphone.

mobile embedded camera in html using Apache Cordova

I'm developing a mobile app using Apache Cordova's API and would like to know if there's a way I could get the camera to work embedded on my application.
I know Apache Cordova has a camera function but it just goes to the native camera app. I wanted it to show the camera feed on the html.
For accessing the device camera I think you can use the HTML5 getUserMedia function, but as you can see here this isn't very well supported by mobile browsers.

Monitoring network activity in an HTML5 iphone/android app?

I want to create an HTML5 app for iPhones and Androids that is based on an HTML5 app framework. The app will do nothing but monitor the network activity (only cellular not WIFI) of the device.
I have been searching for how to do this for a few hours now, but haven't been able to find out how to do this, or even if it is possible or not.
Is it possible to monitor iPhones/Androids network activity in an HTML5 app built on an HTML5 app framework? And if so, how?
(I'd prefer to find a framework that exposes the network data usage of iPhones and Androids to the app instead of coding my own if possible)
If you built the application container for your HTML5 app then yes with the new Web Inspector for Safari, this works as well if your building a mobile html5 app on a server.
Chrome also has a similar debugging feature for Android.
http://webdesign.tutsplus.com/tutorials/workflow-tutorials/quick-tip-using-web-inspector-to-debug-mobile-safari/
https://developers.google.com/chrome-developer-tools/docs/remote-debugging

onkeyup event is not working in mobile phones

i m developing web app that must work in all smart phones
my code is like :
<input type='text' style='width:50px' onkeyup="abc()"/>
and js is like:
function abc(){
alert("something");
}
its working in my computer's browser but its not working in my android phone's browser.
What to do..?
You could try debugging your mobile browser with something like WEINRE or install Adobe Shadow (which uses WEINRE).
WEINRE is essentially a remote web inspector akin to Developer tools provided in Chrome or through Firefox Firebug.
That may help you see the errors and trace the problem.

what audio formats are supported by the android browser?

What audio formats can be played using the html5 'audio' tag in the android browser? Does anyone know where to find official specs on what the android browser supports and not?
For the record, the android media formats page does not seem to cover this - I have soundfiles (3gp) playing fine in a native app, but they won't play in my webapp.
The webkit docs also do not seem to help. My soundfiles play fine in my webapp on iphone, so that version of webkit handles them fine. Shouldn't the android browser have some official documentation somewhere?
Probably there should be official documentation. If you want to test it, why not make a web page on some domain you have access to, with links to all of the different sound files you can think of, and point your browser at it.
After some testing, I've concluded that support for the HTML5 audio element is broken in Android 2.1. Details of my testing can be found on my blog. I tested on an HTC Desire running Android 2.1 and HTC Sense, whereas Amos confirmed the same error on his HTC Heor running a custom 2.1 ROM (thanks, Amos!). If anyone will try the testpage in different configurations and report back either here or on my blog, I will update with any new information.

Categories

Resources