i have a pwa where i am showing a standard input tag like below. this let user tap on it and get access to device camera. However, i want to open the camera as sooon as you open the webpage. is it possible?
current code:
<input type="file" accept="image/x-png,image/jpeg,image/gif" capture="camera"/>
Like Mathias said access to the camera is gated behind user permission.
Instead of an input tag like you are using you should really use the Media Capture API.
You have to get the user's permission to access the camera first. Once you have that permission you can connect to the camera and capture photos and video.
Note: Apple has disabled access to camera from homescreen web apps. No idea when they will turn this on. You can access the camera from regular Safari on iOS, just not from a homescreen web app even though it is the same engine.
Related
How do I create a desktop call to action that goes to either (Apple) Appstore or (Android) Google Play depending on the end-user's needs?
I know we can create multi-link QR codes for mobile but is there anything similar for the desktop?
The functionality you're looking for can reside at the URL in the QR code. The embedded URL could link to a webpage that checks user agents and redirects appropriately. If the Safari on iOS user agent is detected, redirect to Apple's App Store. An Android user agent would be redirected to an appropriate app store. I would set all other user agents to go to a product page with links to both stores.
This could be a nice example!
I have a standalone Adobe AIR application which uses the HTMLloader to embed a webpage and thereby access the Facebook login.
When a user first uses the application thery are first presented with a FB login screen, and then a FB authorization screen, asking if the user wants to share the uploaded image with their friends.
Up until recently everything worked fine.
But it seems that facebook has changed the way the authorization popup displays so my htmlloader no longer can 'see it'. I get a blank page.
The application sees
But should see
Does anyone know of a workaround?
Answering my own question
Supplying an optional userAgent string when I first call login returns an older version of the permissions dialog which renders correctly
I am developing web application for mobiles for iOS and Android. As per requirements, I need to access mobile camera and take photos (more than one).
Then the photos should be stored in localStorage and then uploaded when user clicks on upload.
I am developing a web apps. It is not native app. I dont want to use phonegap or similar to phonegap.
It should be like normal button. not like choose file button.
have a read: here but it will not be supported on all devices.
What is the preferred URL to use to open an iOS app in it's App Store web page as well as the iTunes app (when available on the host device)?
I've tried using the itms:// protocol but this opens the app details in the iTunes app only and so is of no use when the URL is navigated to from an Android or Windows phone for example.
I believe you would want to look at the browser to determine which link to use. If the browser is Safari on iOS device, give them the iTunes protocol link, otherwise, http://.
I believe javascript allows you to read such information: Take a look here: http://www.w3schools.com/js/js_browser.asp
I've discovered that the behaviour of a URL opening an iTunes preview web page before automatically opening the iTunes app on the host device (where available) is triggered by affiliate links (which need to track the click before taking the user to the intended destination).
How does the HTML5 Voice input on Chrome (Mac) get access to the mic? Is it because I have the google voice plugin installed?
Shouldn't the browser explicitly ask for permission before giving access?
http://slides.html5rocks.com/#speech-input
The microphone isn't directly being exposed to the Web pageāit's just posting the speech (and receiving text) through Google servers so it's not considered a security issue (and you have to click the microphone icon to start it). It's pretty similar to how voice input works on Android and Google's iPhone/Blackberry apps.
It is explicitly asking permission before giving access, that's what clicking the microphone icon is.
Think of it more like the <input type="file"> element -- you click "Browse", it shows you your file system, and the browser sends the selected file directly to the server.
For those saying that you can't style the button and it can't be exploited - it was done with Facebook like buttons - http://www.esrun.co.uk/blog/disguising-a-facebook-like-link/
So what's to stop it working for the Google Mic button?