iOS app not prompting to open pictures on iPad Air - html

I used Phonegap to create an iOS app. In the app, I want users to be able to take or select pictures and videos from the Photos app that are later submitted into a database (code for this functionality is included below).
<input type="file" name="video"/><br>
<input type="file" name="image"/>
This functionality works when I run the app on an iPad 4 and iPad 3 (both are on iOS 8). However, when users click "Choose file" on an iPad Air try to take a new photo or video or select a current photo and video, the app crashes. The app also doesn't show up under
Settings->Privacy->Photos as one of the apps that requested access to photos. Any guidance on this issue would be greatly appreciated.

Related

PWA html5 open device camera as soon as page is launched

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.

Is there a way for a Windows tablet— when uploading an image on a website— to prompt to use the camera instead of using the File Explorer?

Problem
I'm currently working on a web application that needs to be able to upload images a lot. It is an <input type="file" name="picture" accept="image/*"> tag. Just like most other tablet or phone, I assumed that users on a Windows tablet— A Dell Venue 10 pro 5055, running on Windows 10 Enterprise in this case— would also be prompted to use the on-device camera or to choose from files. This is unfortunately not the case and makes the application a lot less user-friendly.
Tries
I checked this post: Can you launch the native Camera App from an Html 5 Web App?, the answer stated that using the following tag solved the problem for Android: <input type="file" accept="image/*;capture=camera">. This did not work for Windows.
The following post did provide an answer but that answer only works on Windows 8.1 unfortunately: Capturing images in web application on Windows 8.1 tablets
So is there a way to configure the tablet or to change the <input> tag in such a way that the user will be prompted to take a picture instead of choosing from an existing file?
Thank you in advance!

exporting .vcf contact in mobile web app capable aka HomeScreen app

I suspect this must be intentional on Apples part but I will ask anyway because it works from both mobile and desktop safari.
I create a simple .vcf contact from inside my web app and try to download (aka export) it.
This creates a .vcf file in desktop Safari that is actually downloaded where the user actually has to click that to get it into contacts. And in the mobile safari version (without saving to home screen), the exact same code will pop up a warning screen mobile .vcf warning which at least gives the user the opportunity to import the .vcf into contacts.
Admittedly neither the desktop or mobile safari use case it a good user experience but at least they work.
Whereas, the exact same code saved as a homescreen mobile app simply fails without error on an iphone (i.e
)
I have tried multiple ways to export from the app (most of which work from safari mobile or desktop browsers if NOT web app capable)
as a blob from base64 text/vcard
as base64 text/vcard
using window.open(vcftxt); // where vcftext is base64 text/vcard
using location.href = vcftxt; // where vcftext is base64 text/vcard
using an a tag with download= and href= vcftxt url
All the above work..just not in a homescreen app that appears native
code example (run on iphone safari...not tested on android)
https://www.airbridgelabs.com/s/0/app3.html?sd=100 - Click on contacts logo at the bottom when this page opens in safari and you will see the warning which still allows the user to open the .vcf in contacts
https://www.airbridgelabs.com/s/0/app3.html?sd=100&tm2=100 - This will walk you thru saving to home screen or you can simply save to home screen manually without the tm2 parm. click on the contacts logo at the bottom when this page opens in safari and you will see nothing. Safari developer remote console shows no errors or warnings...simply does not work.
I figure I can probably pass the created .vcf to a page on my server which in turn opens the .vcf which will likely then export it to mobile contacts..but that is a lame solution which still requires the user to be online to save an embedded contact.
And please don't use the argument that this is about security. If it was about security then you wouldn't be allowed to do the exact same thing from a desktop page, or mobile safari page or hybrid native app...and you can. This looks like Apple simply reducing the value of mobile web apps that look native.
What I am looking for is an offline work around to simply save a mobile contact already coded into the mobile web app capable content the user intentionally created.

HTML5 mobile web app camera access

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.

How to detect phone function

I am building an html5 web-app which will hopefully be mainly run from a mobile device. The app has a phone number which when clicked, calls the number displayed.
This works great if the user is using an iPhone or Android etc, but what if the user is using an iPod Touch or iPad with no phone capabilities? On the iPhone simulator in XCode, i get an error message saying that safari cannot open the page.
Is it possible to detect if the device has a phone, and if not, disable the link
Thanks