os-fileup icon indicating copy to clipboard operation
os-fileup copied to clipboard

How do I enable only the camera

Open tiagocaus opened this issue 6 years ago • 9 comments

How do I enable only the camera's photo option, without enabling the file upload option.

Image: https://prnt.sc/nowdli

tiagocaus avatar May 15 '19 13:05 tiagocaus

I'm also looking for this options I tried change

startActivityForResult(chooserIntent, FCR);

to

startActivityForResult(takePictureIntent, FCR);

but it crash

but when I tried

    //startActivityForResult(chooserIntent, FCR);
    Intent it = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
    startActivityForResult(it, FCR);

it works but resolution is very low.

gastzars avatar May 16 '19 09:05 gastzars

Anyone found any solution?

hugeps avatar Jun 08 '19 18:06 hugeps

Anyone found any solution?

nope I didn't

gastzars avatar Jun 11 '19 05:06 gastzars

If you guys are still looking for something, you can try commenting out these:

/*
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
contentSelectionIntent.setType(file_type);
if (multiple_files) {
    contentSelectionIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
*/

mgks avatar Jul 24 '19 06:07 mgks

@mgks your solution is not working

itvignes09 avatar Jan 06 '20 10:01 itvignes09

any one found the solution?

itvignes09 avatar Jan 06 '20 10:01 itvignes09

It worked for me with Ghazi's option.. Are sure it did recompile/redeploy ?

hugeps avatar Jan 06 '20 11:01 hugeps

Hi @hugeps who is Ghazi here. I tried about solutions but it is not working. If it is working for you then kindly post the solution

itvignes09 avatar Jan 06 '20 12:01 itvignes09

If you guys are still looking for something, you can try commenting out these:

/*
contentSelectionIntent.addCategory(Intent.CATEGORY_OPENABLE);
contentSelectionIntent.setType(file_type);
if (multiple_files) {
    contentSelectionIntent.putExtra(Intent.EXTRA_ALLOW_MULTIPLE, true);
}
*/

@itvignes09 he's talking about this solution. once done, try clean build and rebuild. It's working fine in Android Smart WebView

mgks avatar Jan 09 '20 07:01 mgks