Input type = "file" accept = "image / *" doesn’t work in the gap of the phone?

I tried to make an Android app using HTML + phonegap 2.6.0, which supports:

<input type="file" /> 

By default, if HTML is opened through the Android browser, it will display a “camera”, “gallery”, “dropbox”, etc. when you click the @browse button. But if I run the HTML application on the application website, a file selection will appear that we can select from the gallery, Dropbox, music track, etc., with the exception of the camera.

I tried using: <input type="file" accept="image/*" /> , maybe when I run the application, it will show the camera icon. Unfortunately not.

My goal is when I press the browse button, the camera icon appears along with the gallery, etc. Can this be done with a telephone plug ?: (

+2
android browser file cordova user-input
source share
1 answer

For the same need, I made my menu with 2 buttons! Take from the camera / take from the picture. After using the phone lock function camera.getPicture, which opens the default camera application for the camera so that the user can take a picture (if Camera.sourceType = Camera.PictureSourceType.CAMERA, which is the default). Once the photo is taken, the camera application closes and your application is restored.

If Camera.sourceType = Camera.PictureSourceType.PHOTOLIBRARY or Camera.PictureSourceType.SAVEDPHOTOALBUM, a photo selection dialog will be displayed from which you can select a photo from the album.

http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html#Camera

+2
source share

All Articles