Android-SmartWebView icon indicating copy to clipboard operation
Android-SmartWebView copied to clipboard

Image from camera cannot be uploaded - Possible fix

Open deepwather opened this issue 3 years ago • 4 comments

Describe the bug When i try to choose a picture in a chat webpage inside webview, it works, but if i want to use the camera to take a picture and upload it, it does not work.

Expected behavior If I select the camere instead of the filer, the camera should start, and a image can be taken, confirmed and then it should be uploaded.

Possible solution In my attached project sources the camera upload is working as well with API 29 and 30. Hopefully you can use it to solve the problem.

Device:

  • Device name/variant: Huawei P30 Pro (VOG-L29)
  • Build 64Bit
  • Android Version 10.1 (API 30) and other test device is API 29

Additional context

deepwather avatar Jul 12 '20 11:07 deepwather

Good day. When I went to targetSdkVersion 29 loading images from the camera stopped working. SOLVES it by adding the following in AndroidManifest.xml, inside the tag <Application ... ... android: requestLegacyExternalStorage = "true" tools: targetApi = "q">

ezequieloliva avatar Sep 01 '20 16:09 ezequieloliva

加上后 android: requestLegacyExternalStorage = "true" tools: targetApi = "q"> 也未起作用 依然不能使用相机

lip5201 avatar Sep 03 '20 18:09 lip5201

It's actually causing issue from device to device, more than what the SDK is, that's why this certain issue is very difficult to tackle.

mgks avatar Sep 04 '20 15:09 mgks

Dear mgks

I have the same problem. It is expected to occur due to the lack of WRITE_EXTERNAL_STORAGE permission as android OS 11 (API30) is updated.

Hope for help on how to fix the program

Note https://developer.android.com/about/versions/11/privacy/storage#permissions

KWANG-SUNG-EUN avatar Jan 30 '21 06:01 KWANG-SUNG-EUN