-
Notifications
You must be signed in to change notification settings - Fork 473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nothing happens after click image #112
Comments
Search scanlibrary in github you will find other project using the same depo working |
actually projects i dont want i have imported everything properly also i saw one more issue is open with above error but no one replied to it as well |
Was this solved? |
In my case this happens only when the device is running Android 10 and the targetSdkVersion in manifest file is 29. The issue is related to external storage directory accessibility as described in the documentation: To solve this, you can:
|
Thanks i will check this. can you please let me know how to do second option ? i am having android 10 |
public class ScanConstants { public final static String IMAGE_PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath() + "/scanSample"; } |
Hi, i have tried with above solutions but i am getting below error. i am getting this error whenever i click image in camera.
|
@ajinkya976 hey there, did you provide the permission to the installed app on your device, like going to app permissions and providing access to camera and Storage, if not do it and try again. It should work :) |
@shahbikash yes i have given permission but still gets below error when i click image and nothing happens when click check button.
|
where should we add this? in Utils.java or MainActivity.java ? |
Inside library. Just search class name in library project
…On Thu, Jul 9, 2020 at 6:40 PM, 4И0И5UЯF ***@***.***> wrote:
public class ScanConstants {
public final static String IMAGE_PATH =
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).getPath()
+ "/scanSample";
}
where should we add this? in Utils.java or MainActivity.java ?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#112 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACC6GHNW3NLGXFMZ7C6M6BTR2W6UNANCNFSM4KOS3F4A>
.
|
yeah tried, nothing happened the same being able to take a picture from the camera but nothing happens after that. when I click on the select button after clicking the image, crop part is not coming |
Did you solve error ? |
no. i am also getting same error not found any solution till now for this. |
I have tried 2 option tested with getDownloadCacheDir() when I click on the camera it force closes |
yes i have also tried above options but it not worked for me |
Hello. Sorry I could not check code right now but could you try the following?
The idea is that the image file is stored in the application's cache directory. It was tested only using the default camera(Google camera) installed on device. 3rd Party cameras not yet tested. |
Thanks sir I will check out with it |
Hi Mauclores, I am getting same error in Android 10.
|
It's not working when I click camera app gets force closed |
got solution |
Hi Vamsee9 i tried your solution but still getting same error |
Hello ajinkya976, |
Hi Mauclores, Now when i capture photo and click on tick it comes back to main screen where we have camera button but not sets the image. Getting below in console. it prints test 1 but not further SOP in OnActivityResult method.
Here is my full code
|
It means you are not receiving the correct result code, Activity.RESULT_OK after image capture. Aside from camera, have you requested for WRITE_EXTERNAL_STORAGE? |
i tried giving external storage permission also but still same thing is happening. i have updated permission code above. i checked in app setting and it is showing camera and storage permission. Is it possible for you to share your MainActivity.java code ? |
Could you update from this:
To this?
|
I tried above step you suggested but still it is going to main screen after i click on tick button. it prints only test 1 SOP and after that not prints test 2 in OnActivityResult() Below is my full updated code.
|
i think i have to put here CAMERA_REQUEST if i am putting CAMERA_REQUEST then it is going in if condition but saying java.lang.NullPointerException: uri
|
go into your manifest file and try setting android:requestLegacyExternalStorage="true". |
Still getting same error
Manifest File Java Code
|
Inside Reason : getExternalStorageDirectory() has been deprecated in android 11 and 10. But can be used in android 10 with some tweaks in Manifest file like : |
Thank you @anandsaahil , I have resolved my issue with camera feature. |
The code I tried is below: function inp() HTML: |
Hi Everyone,
please find my project here https://drive.google.com/open?id=1pKTq0QwxuN1jy9Q1eFSQyr-TUEHFKHtQ
i am using this library in my project i am able to take picture from camera but nothing happens after that. when i click on select button after clicking image, crop part is not coming. i am getting below error.
The text was updated successfully, but these errors were encountered: