SubhamTyagi / android-ocr

Tesseract based OCR for android
Apache License 2.0
374 stars 62 forks source link

Import pictures from gallery #37

Open User1l0 opened 2 years ago

User1l0 commented 2 years ago

Pressing the gallery button shows only camera to choose, please add an option to choose pics from gallery also

SubhamTyagi commented 2 years ago

Screenshot? Device? Android version?

User1l0 commented 2 years ago

Screenshot? Device? Android version? It's Android 10 Ocr only shows camera option to import pictures

pixel2user commented 2 years ago

I second that: "Pressing the gallery button shows only camera to choose."

Screenshot_20220102-002125_Android_System

I use Android 10 (LineageOS) on a Google Pixel 2 device.

SubhamTyagi commented 2 years ago

Could you try this apk

fohfuu commented 2 years ago

Device: Motorola One Fusion+ Ver.: 10

Having the same issue. When I check in App Manager log viewer, both the F-Droid versions and this debug version display the message: [time] [date] W/View (27118): couldn't find view with id 2131296907 Exact same every time.

I observed that when you do the same thing on Android 9, there are two intents: Screencap. Shows that the "Select source" panel has two options that can be intercepted by App Manager.

On inspection, the first is android.media.action.IMAGE_CAPTURE (as expected), and the second is android.media.action.GET_CONTENT.

However, the manifest specifies the query 'android.intent.action.PICK', not GET_CONTENT.

I'm no coder, but I believe the issue is here. GET_CONTENT is used in the program, but the manifest uses ACTION_PICK.

Unfortunately, I can't find out any more without having developer skills. I hope this is a helpful.