Show only camera intent In a web browser in android? Failed to get only camera intent? Android 5+ and 6+

I followed this or this for upload. Uploading Images and Capturing Images. Image Gallery or Camera in Web View

I work it in android 6+, but here I get Gallery or Filemanager, not a camera ...

Can anyone suggest me to get only Camera Intent (insted of gallery or filemanager) .. To capture and upload to webview ..

I get below options

enter image description here I do not get the camera intent in the web browser. It works fine in browser and Uploading Image, but not in web review, please help ...

Update 1

When I click on the Android system, I get Camera

enter image description here

Is it possible to get this camera directly in the web view .. Please help in android 6+. I don’t even get the intentions of the Android system. No camera choice ...

But the same thing works in the browser. Not in web view

Update 2

Using the same one in the emulator, it shows only the camera option. But where, like in a real device. Showing the file manipulator or Gallery for android 6+, there is no camera option I tried with almost all brands even Redmi and YU also

Here I tried with a custom camera But there I can not upload an image Please help

Plese, any of us offers me regarding this

+6
source share
1 answer

Here's how you can take pictures with the camera

Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); 

you will need this permission ALWAYS

 <uses-feature android:name="android.hardware.camera" android:required="true" /> 

To capture a captured camera

 @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) { Bundle extras = data.getExtras(); Bitmap imageBitmap = (Bitmap) extras.get("data"); mImageView.setImageBitmap(imageBitmap); } } 

The Android Camera application encodes the photo in the reverse intention , delivered in onActivityResult () , as a small bitmap in additional functions under the key "data". The following code retrieves this image and displays it in an ImageView .

Required Link: Android Documentation

Hope this helps. Hooray!

-one
source

All Articles