Open wimZ opened 4 years ago
I have observed the same issue on my side
I am getting the same issue in my ionic project. is somebody find any way to fix this problem?
Same issue im facing, help me asap.
I have observed the same issue on my side
when will u fix this?
@ChrisTomAlx Can u tell me when u will help Low memory issue in plugin
Any Luck??
On Wed, Jul 29, 2020 at 6:08 PM Christy Thomas Alex < notifications@github.com> wrote:
There is no timeline as of now. So I don't really have an immediate answer for you. But I can look at any PRs that are raised to address this issue.
Cheers, Chris https://github.com/ChrisTomAlx Neutrinos http://www.neutrinos.co/
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-665639003, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXNPZCBEZA6NXAKFKL6F63R6AJ5VANCNFSM4M7W7HFQ .
Same issue after done above steps
On Sun, Aug 16, 2020 at 11:52 AM Anshuman Nayak notifications@github.com wrote:
@ChrisTomAlx https://github.com/ChrisTomAlx @sachiv-logiciel https://github.com/sachiv-logiciel @wimZ https://github.com/wimZ @narupareliya https://github.com/narupareliya I solved this issue of "LOW MEMORY" . follow the steps below to use in your corodova projects
- add this plugin to your project "cordova plugin add cordova-plugin-document-scannner".
- build it once .
- Download the scanlibrary from Neutrinos github repository ( I used scanlibrary -2.5). link:- click here https://github.com/NeutrinosPlatform/scanlibrary/tree/v2.5
- unzip the scanlibrary
- open with android studio
- wait for gradle sync to finish
- add required sdks and build tools ( You can otherwise edit the version inside "library/build.gradle" file to adjust it to your available sdk and build tool ).
- restart the Android studio.
- wait for gradle sync to finish.
- Build your project
- after successful build you will get a 'library-debug.arr' inside the "library/builds/outputs/arr/".
- copy that file.
- Go to "C:\Users\USER_NAME.gradle\caches\modules-2\files-2.1\com.github.NeutrinosPlatform\scanlibrary\2.5\6209d26ba4ea44188835ca326adb4a3db9cfd7af" (since this is a temporary directory name will vary from system to system , you can apply a search in windows search tool using keyword "scanlibrary-2.5.aar"(version name varies)).
- Paste your "library-debug.arr" inside it .
- copy the name of previous '.arr' file present inside the directory.(ex. scanlibrary-2.5.aar ) .
- Delete the previous file (ex. scanlibrary-2.5.aar).
- Rename your copied file (library-debug.arr) to (scanlibrary-2.5.aar).
- Thats it ! 💯 💯 🥇 You can also change the code according to your requirement . Thank Neutrinos platform for such beautiful library Enjoy Your patching .Now your patching done There should be no "Low Memory" warning after this. (TESTED OK ,ANSHUMAN NAYAK ,CTO N3XVERSE PVT. LTD. ). for any other issue feel free to contact me at : Mail http://anshuman@nexsb.in 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-674485685, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXNPZECZACBMFVHHXRLPYLSA53LBANCNFSM4M7W7HFQ .
Are You sure , because I have tried and using this in my application without any error
Don't forget to build your SDK after editing the library
Can you provide the portion you edited.
On Tue, 18 Aug, 2020, 9:58 AM WAS Developer, notifications@github.com wrote:
Same issue after done above steps
On Sun, Aug 16, 2020 at 11:52 AM Anshuman Nayak notifications@github.com wrote:
@ChrisTomAlx https://github.com/ChrisTomAlx @sachiv-logiciel https://github.com/sachiv-logiciel @wimZ https://github.com/wimZ @narupareliya https://github.com/narupareliya I solved this issue of "LOW MEMORY" . follow the steps below to use in your corodova projects
- add this plugin to your project "cordova plugin add cordova-plugin-document-scannner".
- build it once .
- Download the scanlibrary from Neutrinos github repository ( I used scanlibrary -2.5). link:- click here https://github.com/NeutrinosPlatform/scanlibrary/tree/v2.5
- unzip the scanlibrary
- open with android studio
- wait for gradle sync to finish
- add required sdks and build tools ( You can otherwise edit the version inside "library/build.gradle" file to adjust it to your available sdk and build tool ).
- restart the Android studio.
- wait for gradle sync to finish.
- Build your project
- after successful build you will get a 'library-debug.arr' inside the "library/builds/outputs/arr/".
- copy that file.
- Go to
"C:\Users\USER_NAME.gradle\caches\modules-2\files-2.1\com.github.NeutrinosPlatform\scanlibrary\2.5\6209d26ba4ea44188835ca326adb4a3db9cfd7af" (since this is a temporary directory name will vary from system to system , you can apply a search in windows search tool using keyword "scanlibrary-2.5.aar"(version name varies)).
- Paste your "library-debug.arr" inside it .
- copy the name of previous '.arr' file present inside the directory.(ex. scanlibrary-2.5.aar ) .
- Delete the previous file (ex. scanlibrary-2.5.aar).
- Rename your copied file (library-debug.arr) to (scanlibrary-2.5.aar).
- Thats it ! 💯 💯 🥇 You can also change the code according to your requirement . Thank Neutrinos platform for such beautiful library Enjoy Your patching .Now your patching done There should be no "Low Memory" warning after this. (TESTED OK ,ANSHUMAN NAYAK ,CTO N3XVERSE PVT. LTD. ). for any other issue feel free to contact me at : Mail http://anshuman@nexsb.in 👍
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-674485685 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AKXNPZECZACBMFVHHXRLPYLSA53LBANCNFSM4M7W7HFQ
.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-675241891, or unsubscribe https://github.com/notifications/unsubscribe-auth/APMUDCIK4B2PYNTM6HVOB33SBH7NRANCNFSM4M7W7HFQ .
cordova plugin add cordova-plugin-document-scannner
Command failed with exit code 1: npm view cordova-plugin-document-scannner --json npm ERR! code E404 npm ERR! 404 'cordova-plugin-document-scannner' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! 404 npm ERR! 404 'cordova-plugin-document-scannner@latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: npm ERR! /home/nalin/.npm/_logs/2020-08-20T04_54_06_917Z-debug.log { "error": { "code": "E404", "summary": "'cordova-plugin-document-scannner' is not in the npm registry.\nYou should bug the author to publish it\n(or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url.", "detail": "\n 'cordova-plugin-document-scannner@latest' is not in the npm registry.\nYou should bug the author to publish it (or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url." } }
cordova plugin add cordova-plugin-document-scannner
Command failed with exit code 1: npm view cordova-plugin-document-scannner --json npm ERR! code E404 npm ERR! 404 'cordova-plugin-document-scannner' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! 404 npm ERR! 404 'cordova-plugin-document-scannner@latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: npm ERR! /home/nalin/.npm/_logs/2020-08-20T04_54_06_917Z-debug.log { "error": { "code": "E404", "summary": "'cordova-plugin-document-scannner' is not in the npm registry.\nYou should bug the author to publish it\n(or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url.", "detail": "\n 'cordova-plugin-document-scannner@latest' is not in the npm registry.\nYou should bug the author to publish it (or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url." } }
@NautamSanghani sorry Bro by mistake I used ""cordova-plugin-document-scannner"" , which is actually "cordova-plugin-document-scanner"( spell mistakes)
Thanks NeutrinosPlatform/cordova-plugin-document-scanner solve my issue
On Fri, Aug 21, 2020 at 8:27 AM Anshuman Nayak notifications@github.com wrote:
cordova plugin add cordova-plugin-document-scannner
Command failed with exit code 1: npm view cordova-plugin-document-scannner --json npm ERR! code E404 npm ERR! 404 'cordova-plugin-document-scannner' is not in the npm registry. npm ERR! 404 You should bug the author to publish it npm ERR! 404 (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url. npm ERR! 404 npm ERR! 404 'cordova-plugin-document-scannner@latest' is not in the npm registry. npm ERR! 404 You should bug the author to publish it (or use the name yourself!) npm ERR! 404 npm ERR! 404 Note that you can also install from a npm ERR! 404 tarball, folder, http url, or git url.
npm ERR! A complete log of this run can be found in: npm ERR! /home/nalin/.npm/_logs/2020-08-20T04_54_06_917Z-debug.log { "error": { "code": "E404", "summary": "'cordova-plugin-document-scannner' is not in the npm registry.\nYou should bug the author to publish it\n(or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url.", "detail": "\n 'cordova-plugin-document-scannner@latest' is not in the npm registry.\nYou should bug the author to publish it (or use the name yourself!)\n\nNote that you can also install from a\ntarball, folder, http url, or git url." } }
@NautamSanghani https://github.com/NautamSanghani sorry Bro by mistake I used ""cordova-plugin-document-scannner"" , which is actually "cordova-plugin-document-scanner"( spell mistakes)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-678009897, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKXNPZGVOJO2USJRU766XALSBXO77ANCNFSM4M7W7HFQ .
It's not working in Android 10, Samsung Galaxy J8 mobile after taking picture it's showing black screen
I'm having the same black screen problem as https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-688596560 running Android 10 on a Samsung Galaxy S9. I'm using Ionic and Cordova with this plugin.
Ionic CLI : 6.11.8
Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0, ios 6.1.0
remove platform android and run ionic cordova platform add android@8.0.0
remove platform android and run ionic cordova platform add android@8.0.0
@SeaEagleEye Do you know what the issue is requiring moving back to 8.0.0
?
No It's just a quick fix
On Thu, Sep 17, 2020 at 4:28 AM David Quon notifications@github.com wrote:
remove platform android and run ionic cordova platform add android@8.0.0
@SeaEagleEye https://github.com/SeaEagleEye Do you know what the issue is requiring moving back to 8.0.0?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-693709197, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMRHUC5MESIZI7AX2NBNKGDSGE7LDANCNFSM4M7W7HFQ .
Anybody got solutions for multi scan
On Thu, 17 Sep, 2020, 12:02 pm Prajwal, notifications@github.com wrote:
No It's just a quick fix
On Thu, Sep 17, 2020 at 4:28 AM David Quon notifications@github.com wrote:
remove platform android and run ionic cordova platform add android@8.0.0
@SeaEagleEye https://github.com/SeaEagleEye Do you know what the issue is requiring moving back to 8.0.0?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub < https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-693709197 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMRHUC5MESIZI7AX2NBNKGDSGE7LDANCNFSM4M7W7HFQ
.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-693971609, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIY3VVHI5AN3PCIZJMUJELDSGGURTANCNFSM4M7W7HFQ .
For me it works on android 8.0 using android-targetSdkVersion: 29
Unluckily it does not work on 8.1.0, and that is the version that enables application bundles (.aab)
Can you implement multi scan functionality If you implement that will be great
On Mon, 21 Sep, 2020, 1:39 pm Christy Thomas Alex, notifications@github.com wrote:
That is really strange. I will try and pick this up as soon as work on the plugin starts again
Thanks for all the testing you guys have done :)
Cheers, Chris https://github.com/ChrisTomAlx Neutrinos http://www.neutrinos.co/
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/74#issuecomment-695966751, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIY3VVERRZLO7YBIKHUG2SLSG4C2PANCNFSM4M7W7HFQ .
I can confirm the observation of SeaEagleEye that the plugin shows the black screen after taking the picture. Anyway reverting to cordova platform Android 8 did not solve the issue for me.
Released a new beta version of the plugin.
To test it :-
cordova plugin rm cordova-plugin-document-scanner
cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.0
cordova plugin add cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
If you guys could help by testing this beta version and let me know if it solved your issue, I can release the 5.0.0 version. Latest plugin also solves this issue
Thx, I'll go test later this week.
:)
wimZ
10 nov. 2020 13:21:08 Christy Thomas Alex notifications@github.com:
To test it :-
Make sure to remove the old version using cordova plugin rm cordova-plugin-document-scanner
To test it add the following to your project
cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.0
cordova plugin add cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter If you guys could help by testing this beta version and let me know if it solved your issue, I can release the 5.0.0 version. Latest plugin also solves this issue[https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNeutrinosPlatform%2Fscanlibrary%2Fissues%2F6&data=04%7C01%7C%7Cdf4d06b868234f10bdb808d8857319f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637406076679719337%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=QzOhOXikFAGVvgt3FQoumWSf1VUFGgaYzMj36hS7F5E%3D&reserved=0]
Cheers and have a nice day :) Chris[https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FChrisTomAlx&data=04%7C01%7C%7Cdf4d06b868234f10bdb808d8857319f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637406076679729333%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=NuNFEOvx3pQYipTQL0WNbkEm3tPPqJm9ts8qjZoUl5M%3D&reserved=0] Neutrinos[https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.neutrinos.co%2F&data=04%7C01%7C%7Cdf4d06b868234f10bdb808d8857319f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637406076679729333%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Ab4a7AD8DamUkCt85OlFAi4dANZtTwzVvDE4v0CPGNg%3D&reserved=0]
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub[https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNeutrinosPlatform%2Fcordova-plugin-document-scanner%2Fissues%2F74%23issuecomment-724667450&data=04%7C01%7C%7Cdf4d06b868234f10bdb808d8857319f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637406076679729333%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=alidF4T79iXGtq2%2BtZZV0dN0Jo7iISrw4Ijn0PaR89Y%3D&reserved=0], or unsubscribe[https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD2YDNNDXSDW4HGY3DCMAJDSPEV3HANCNFSM4M7W7HFQ&data=04%7C01%7C%7Cdf4d06b868234f10bdb808d8857319f2%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637406076679739328%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=8mB%2BCz8im1jEOy%2BZuWah342Dc0LUW6OjRi9tFSalW3o%3D&reserved=0]. [https://github.com/notifications/beacon/AD2YDNKYEMZM6M72VU47OVTSPEV3HA5CNFSM4M7W7HF2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOFMYYYOQ.gif]
I tested the beta but the behaviour does not change. After taking the photo it still shows the black screen like SeaEagleEye showed on 8 Sep.
Additional information, but probably not a problem. When adding the plugin "cordova-plugin-androidx" I get the following output:
cordova plugin add cordova-plugin-androidx Installing "cordova-plugin-androidx" for android Plugin doesn't support this project's cordova-android version. cordova-android: 9.0.0, failed version requirement: <9.0.0 Skipping 'cordova-plugin-androidx' for android Adding cordova-plugin-androidx to package.json
Seems like cordova android 9.0 doesn't need cordova-plugin-androidx?
I just tested it as well.
I get a scanDoc error result ‘incorrect result or user cancelled the action’
Are there minimum version dependencies?
Regards, wim
@benediktcarda @wimZ Could you guys add the following to config.xml as suggested by this comment and see if the issue persists?
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true"/>
</edit-config>
Also @benediktcarda it does not matter that cordova-plugin-androidx
is deprecated, just add it nonetheless and add the other one too. You can ignore the deprecation notice and continue.
On first try it works!
I’ll do some more testing later
Thanks
After adding
`
`
it started to work again (I can crop the scanned pages and save to my application), but now I get the low memory message wimZ reported initially.
@wimZ If possible when you reply via email click the 3 dots and remove the history then respond. I have edited your comments and removed the unnecessary reply quotes for now. Also thanks for helping with the testing :). Let me know if you face any other issues in your testing. I will also fix this need to request legacy storage before I release ver 5.0.0.
@benediktcarda Is it just showing low memory error and then you are able to scan normally? or low memory then it just keeps opening up the camera UI over and over again until app crashes? If you are able to continue normally it might actually be an issue with memory and this is expected behavior. Either way let me see what I can find and thank for testing the beta version :)
hi @ChrisTomAlx ..
i saw in your scan library
createdirectory when opencamera is not working with API 29
even if i put androidx
and this one still not working also
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application"> <application android:usesCleartextTraffic="true" android:requestLegacyExternalStorage="true"/> </edit-config>
and this code one is not working anymore with API 29 ,
Environment.getExternalStorageDirectory()
i did debug , and i found this :
W/System.err: java.io.FileNotFoundException: open failed: ENOENT (No such file or directory)
W/System.err: at android.os.ParcelFileDescriptor.openInternal(ParcelFileDescriptor.java:315)
W/System.err: at android.os.ParcelFileDescriptor.open(ParcelFileDescriptor.java:220)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1505)
at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:1427)
at com.scanlibrary.PickImageFragment.getBitmap(PickImageFragment.java:238)
at com.scanlibrary.PickImageFragment.onActivityResult(PickImageFragment.java:165)
at android.app.Activity.dispatchActivityResult(Activity.java:8319)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5090)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5138)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7814)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
and also this one , i think this one when opencamera function
W/System.err: at com.scanlibrary.PickImageFragment.clearTempImages(PickImageFragment.java:75)
at com.scanlibrary.PickImageFragment.createImageFile(PickImageFragment.java:148)
at com.scanlibrary.PickImageFragment.openCamera(PickImageFragment.java:128)
at com.scanlibrary.PickImageFragment.handleIntentPreference(PickImageFragment.java:85)
at com.scanlibrary.PickImageFragment.init(PickImageFragment.java:66)
at com.scanlibrary.PickImageFragment.onCreateView(PickImageFragment.java:56)
at android.app.Fragment.performCreateView(Fragment.java:2534)
at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1303)
W/System.err: at android.app.FragmentManagerImpl.addAddedFragments(FragmentManager.java:2431)
at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2210)
at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2166)
at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2067)
at android.app.FragmentManagerImpl.dispatchMoveToState(FragmentManager.java:3057)
at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3004)
at android.app.FragmentController.dispatchActivityCreated(FragmentController.java:184)
at android.app.Activity.performCreate(Activity.java:7962)
at android.app.Activity.performCreate(Activity.java:7944)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1307)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3423)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3595)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2147)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:237)
at android.app.ActivityThread.main(ActivityThread.java:7814)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1068)
D/: openCamera: isDirectoryCreated: false
already try run with your scanlibrary 3.2 still not working
Update :
i found that Storage permission are not Allowed , already put <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
in AndroidManifest.xml but its not working , after i turn on allow manually from setting->apps->permision . its working
reg, tama
I also get the "Incorrect result or user cancelled the action" message when I take a photo.
Adding android:requestLegacyExternalStorage="true"
to the AndroidManifest.xml seems to fix the problem but idk if this is a viable solution as @ChrisTomAlx noted here https://github.com/NeutrinosPlatform/cordova-plugin-document-scanner/issues/82#issuecomment-725231041
@sergiuturus Released 5.0.0-beta.1 of this plugin with the fixes. Let me know if this fixes your issue.
To test it :-
cordova plugin rm cordova-plugin-document-scanner
cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.1
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
In my case, on android, the plugin dont clear images, how can i exclude generated image by plugin?
The comand cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.1 work to me, but dont clear saved images in android
@sergiuturus Released 5.0.0-beta.1 of this plugin with the fixes. Let me know if this fixes your issue.
To test it :-
- Make sure to remove the old version using
cordova plugin rm cordova-plugin-document-scanner
To test it add the following to your project
cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.1
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
Still showing the low memory message, but in the end the scan is made. I am using cordova android 9.0.0 so i did not install the AndroidX plugins, because they are not compatible with version 9
@sergiuturus Lançado 5.0.0-beta.1 deste plugin com as correções. Avise-me se isso resolver o seu problema.
Para testar: -
- Certifique-se de remover a versão antiga usando
cordova plugin rm cordova-plugin-document-scanner
Para testá-lo, dependerá do seguinte ao seu projeto
cordova plugin add cordova-plugin-document-scanner@5.0.0-beta.1
cordova plugin add cordova-plugin-androidx
cordova plugin add cordova-plugin-androidx-adapter
I solved the exclusion problem using the cordova file plugin.however I was unable to remove the low memory message. How can I hide it? Do you have a solution? If so tell me where I should modify that I even fork or branch
getCamera(){
let opts: DocumentScannerOptions = {
sourceType:1,
quality:2.0,
returnBase64: false,
};
this.documentScanner.scanDoc(opts)
.then((res) =>{
console.log(res)
if (this.platform.is('ios')) {
let img = this.webview.convertFileSrc(res)
let imagemTratada = this.domSanatize.bypassSecurityTrustUrl(img)
this.images.push(imagemTratada)
this.caminhoImg.push(res)
} else {
this.filePath.resolveNativePath(res).then((url) => {
//Data = file:///storage/emulated/0/Pictures/ + nome da imagem
this.filePath.resolveNativePath(res).then((data) => {
let filename = res.substring(res.lastIndexOf('/') +1);
let path = res.substring(0,res.lastIndexOf('/') +1)
this.file.readAsDataURL(path,filename).then((base64string) => {
console.log(base64string)
this.images.push(base64string)
this.file.resolveDirectoryUrl(this.file.cacheDirectory).then(data => {
console.log(data.nativeURL) ;
this.file.moveFile(path, filename, data.nativeURL,filename).then((resposta)=>{
console.log(resposta)
console.log(resposta.nativeURL)
this.caminhoImg.push(resposta.nativeURL)
}).catch((error) => console.log(error))
});
})
})
})
}
this.verificaCondicao();
})
.catch((error) => console.error(error));
}
limpaDiretorio(){
this.file.resolveDirectoryUrl(this.file.externalRootDirectory ).then((data)=>{
let caminho = data.nativeURL
this.file.removeRecursively(caminho, 'scanSample').then((res) =>{
console.log(res)
this.limpaCache();
}).catch(error => {
console.log(error)
this.limpaCache();
})
}).catch(error => console.log(error))
}
limpaCache(){
this.file.resolveDirectoryUrl(this.file.cacheDirectory).then(data => {
this.file.listDir(data.nativeURL, '').then(async (res) => {
console.log(res)
if (res.length > 0 ) {
for (let i = 0; i < res.length; i++) {
await this.file.resolveLocalFilesystemUrl(res[i].nativeURL).then((newNativeURL)=> {
newNativeURL.remove(
()=>console.log('sucesso ao excluir'),
()=>console.log('Erro ao excluir')
);
})
}
}
})
});
}
can some one give me the code to get Base64 of image in Pictures. path : file:///storage/emulated/0/Pictures/my_image.jpg am trying to get base64 string from Base64 & File plugins but through both the approach am getting null outpot
The problem that after taking a picture it's showing a black screen is back. Got it reported from a user and tried it myself. When having the blank black screen you can do nothing but either click on the camera icon and take another photo (which again leads to the black screen) or you can click on the folder icon, choose another photo from the gallery and even manipulate the edges but as soon as you click "save" you get the error:
open /storage/emulated/0/Pictures/Title - Sun Mar 13 16-23_45 GMT+01_00 2000.jpg: open failed: EACCES (Permission denied)
@ChrisTomAlx : just a thought, but i do not have any app building experience.
The error pops up just after the "cropping/automatic edge selection" stage. It seems to me that the “cropping” is done while the photo taken is still in high quality. Is this a very memory intentive task? Otherwise maybe descaled the image to a lower quality before this stage. Instead of adjusting the quality in a later stage.
Will delete the comment if i'm talking nonsense ;)
Hola ¿Alguien ha podido encontrar solucion a este problema?
ScanDoc after the camera finishes, sometimes comes with a Low Memory warning. It seems related to the complexity/darkness of the image. the app does not crash since the library fix (4.2.5), but continues after a tap/back. I have tried with image-quality 1 and 2.5 with the same result.
I never observed this issue on Android 9, but it appeared after upgrading to Android 10.
This is the error message![ScanDoc Low Memory Error](https://user-images.githubusercontent.com/16089525/81814104-9d639100-9528-11ea-9eb1-dce880d67ee9.jpg)
Versions:
If there any additional info or assistance is needed, please let me know. I appreciate any suggestions.