
I tried to make a android app using HTML + phonegap 2.6.0 which is support:
<input type="file" />
By default, if the HTML is open via android browser itself, it will show "camera" , "gallery" , "dropbox" etc when clicking @ browse button. But if I run the HTML on app webview, file chooser is coming up which is we can choose from gallery, dropbox, music track etc except from camera.
I tried to use:<input type="file" accept="image/*" />
perhaps when I run the app it will showing camera icon to choose. Unfortunately no.
My objective is when i press on browse button, the camera icon is showing up together with gallery etc.. It is possible to do this with phonegap? :(
Answer1:
For same need, i've madea custom menu with 2 button ! Take from camera / take from picture. After just use phone gap function camera.getPicture that opens the device's default camera application 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, then a photo chooser dialog is shown, from which a photo from the album can be selected.
http://docs.phonegap.com/en/2.6.0/cordova_camera_camera.md.html#Camera