saumitrabhave / qr-zbar-ane

ANE for QR Code Reader
MIT License
84 stars 23 forks source link

Problem on Android 6+ with air SDK 25 #72

Open emreayaydin opened 7 years ago

emreayaydin commented 7 years ago

Hello there!

Thank you very much for your great ANE. It is really impressive. I used this in my few project. But I just noticed a problem. actually it is really big problem for me. It works perfectly on ios and lower android versions than 6. But when I compile the app with AIR SDK 25, it doesnt work on android 6.

Maybe, it is about new android permission model.

Can you fix this issue? if you can do it, I will be really grateful..

saumitrabhave commented 7 years ago

Hi,

Can you please share the details of error/ crash from logs. It would really save my time a lot.

Thanks very much, Saumitra

On Wed, 3 May 2017 at 7:56 PM, emreayaydin notifications@github.com wrote:

Hello there!

Thank you very much for your great ANE. It is really impressive. I used this in my few project. But I just noticed a problem. actually it is really big problem for me. It works perfectly on ios and lower android versions than 6. But when I compile the app with AIR SDK 25, it doesnt work on android 6.

Maybe, it is about new android permission model.

Can you fix this issue? if you can do it, I will be really grateful..

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/saumitrabhave/qr-zbar-ane/issues/72, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCfBWJne3vzMn-X_A02RX1ABZUq6VGzks5r2I6lgaJpZM4NPesA .

-- Saumitra Bhave VJTI, Mumbai

emreayaydin commented 7 years ago

Hey man! Thank you so much for your fast reply but I wasnt fast like you :) Because I haven't accessed the adb logcat before. But finally I did it. There is the my log below.

I m really stuck. It works with air sdk 22 on android 6.0 but not air 25. And I have to use latest air sdk because; I releaseda a version with air sdk 25 and I cant update a new bulild with compile air 22. because google play doesnt accept the lower sdk than previous release.

Please help me :) Thank you!!


05-05 18:15:58.938 15639 15639 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP
05-05 18:15:58.997  1440  3049 V WifiServerServiceExt: checkPollTimer Cnt= 0 rssi =-72 threshold=-100
05-05 18:15:59.369 15639 15639 I QRExtension: createContext()
05-05 18:15:59.369 15639 15639 I QRExtensionContext: Reset Scanner
05-05 18:15:59.378 15639 15639 W System.err: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/air.com.s****.s*******-1/lib/arm/libiconv.so: has text relocations
05-05 18:15:59.379 15639 15639 W System.err:    at java.lang.Runtime.loadLibrary(Runtime.java:372)
05-05 18:15:59.379 15639 15639 W System.err:    at java.lang.System.loadLibrary(System.java:1076)
05-05 18:15:59.379 15639 15639 W System.err:    at net.sourceforge.zbar.ImageScanner.<clinit>(ImageScanner.java:35)
05-05 18:15:59.379 15639 15639 W System.err:    at com.sbhave.nativeExtension.QRExtensionContext.resetScanner(QRExtensionContext.java:116)
05-05 18:15:59.379 15639 15639 W System.err:    at com.sbhave.nativeExtension.QRExtension.createContext(QRExtension.java:39)
05-05 18:15:59.379 15639 15639 W System.err:    at com.adobe.air.customHandler.callTimeoutFunction(Native Method)
05-05 18:15:59.380 15639 15639 W System.err:    at com.adobe.air.customHandler.handleMessage(customHandler.java:22)
05-05 18:15:59.380 15639 15639 W System.err:    at android.os.Handler.dispatchMessage(Handler.java:102)
05-05 18:15:59.380 15639 15639 W System.err:    at android.os.Looper.loop(Looper.java:148)
05-05 18:15:59.380 15639 15639 W System.err:    at android.app.ActivityThread.main(ActivityThread.java:5525)
05-05 18:15:59.380 15639 15639 W System.err:    at java.lang.reflect.Method.invoke(Native Method)
05-05 18:15:59.380 15639 15639 W System.err:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730)
05-05 18:15:59.380 15639 15639 W System.err:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
05-05 18:16:00.003  1440  3024 D PowerManagerServiceAO: acquireWakeLockInternal: lock=84002801, flags=0x40000001, tag="*alarm*", ws=WorkSource{1000}, historyTag=*alarm*:android.intent.action.TIME_TICK, uid=1000, pid=1440
05-05 18:16:00.041  3126  3126 I [SystemUI]TimeTickManager: setTimeTickHandler, called onTimeChanged() nextTick: 59992
05-05 18:16:00.041  3126  3126 I KeyguardUpdateMonitor: called onTimeUpdated()
05-05 18:16:00.041  3126  3126 I [SystemUI]Clock: called onTimeUpdated()
05-05 18:16:00.055  3126  3126 I LgeClockWidgetControlView: called onTimeUpdated()
05-05 18:16:00.055  3126  3126 I [SystemUI]DateView: called onTimeUpdated()
05-05 18:16:00.058  3126  3126 I [SystemUI]DateView: called onTimeUpdated()
05-05 18:16:00.073  3126  3126 D KeyguardUpdateMonitor: handleTimeUpdate
saumitrabhave commented 7 years ago

Hmmm, seems like I will have to rebuild the ane with new libiconv as android 6 has made some breaking change in the way shared native libraries are linked. I will update you once I release the fix so you can test on all your device combinations and give me a green.

On Fri, 5 May 2017 at 9:11 PM, emreayaydin notifications@github.com wrote:

Hey man! Thank you so much for your fast reply but I wasnt fast like you :) Because I haven't accessed the adb logcat before. But finally I did it. There is the my log below.

I m really stuck. It works with air sdk 22 on android 6.0 but not air 25. And I have to use latest air sdk because; I releaseda a version with air sdk 25 and I cant update a new bulild with compile air 22. because google play doesnt accept the lower sdk than before release.

Please help me :) Thank you!!

05-05 18:15:58.938 15639 15639 I ViewRootImpl: ViewRoot's Touch Event : ACTION_UP 05-05 18:15:58.997 1440 3049 V WifiServerServiceExt: checkPollTimer Cnt= 0 rssi =-72 threshold=-100 05-05 18:15:59.369 15639 15639 I QRExtension: createContext() 05-05 18:15:59.369 15639 15639 I QRExtensionContext: Reset Scanner 05-05 18:15:59.378 15639 15639 W System.err: java.lang.UnsatisfiedLinkError: dlopen failed: /data/app/air.com.s**.s*****-1/lib/arm/libiconv.so: has text relocations 05-05 18:15:59.379 15639 15639 W System.err: at java.lang.Runtime.loadLibrary(Runtime.java:372) 05-05 18:15:59.379 15639 15639 W System.err: at java.lang.System.loadLibrary(System.java:1076) 05-05 18:15:59.379 15639 15639 W System.err: at net.sourceforge.zbar.ImageScanner.(ImageScanner.java:35) 05-05 18:15:59.379 15639 15639 W System.err: at com.sbhave.nativeExtension.QRExtensionContext.resetScanner(QRExtensionContext.java:116) 05-05 18:15:59.379 15639 15639 W System.err: at com.sbhave.nativeExtension.QRExtension.createContext(QRExtension.java:39) 05-05 18:15:59.379 15639 15639 W System.err: at com.adobe.air.customHandler.callTimeoutFunction(Native Method) 05-05 18:15:59.380 15639 15639 W System.err: at com.adobe.air.customHandler.handleMessage(customHandler.java:22) 05-05 18:15:59.380 15639 15639 W System.err: at android.os.Handler.dispatchMessage(Handler.java:102) 05-05 18:15:59.380 15639 15639 W System.err: at android.os.Looper.loop(Looper.java:148) 05-05 18:15:59.380 15639 15639 W System.err: at android.app.ActivityThread.main(ActivityThread.java:5525) 05-05 18:15:59.380 15639 15639 W System.err: at java.lang.reflect.Method.invoke(Native Method) 05-05 18:15:59.380 15639 15639 W System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:730) 05-05 18:15:59.380 15639 15639 W System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620) 05-05 18:16:00.003 1440 3024 D PowerManagerServiceAO: acquireWakeLockInternal: lock=84002801, flags=0x40000001, tag="alarm", ws=WorkSource{1000}, historyTag=alarm:android.intent.action.TIME_TICK, uid=1000, pid=1440 05-05 18:16:00.041 3126 3126 I [SystemUI]TimeTickManager: setTimeTickHandler, called onTimeChanged() nextTick: 59992 05-05 18:16:00.041 3126 3126 I KeyguardUpdateMonitor: called onTimeUpdated() 05-05 18:16:00.041 3126 3126 I [SystemUI]Clock: called onTimeUpdated() 05-05 18:16:00.055 3126 3126 I LgeClockWidgetControlView: called onTimeUpdated() 05-05 18:16:00.055 3126 3126 I [SystemUI]DateView: called onTimeUpdated() 05-05 18:16:00.058 3126 3126 I [SystemUI]DateView: called onTimeUpdated() 05-05 18:16:00.073 3126 3126 D KeyguardUpdateMonitor: handleTimeUpdate

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/saumitrabhave/qr-zbar-ane/issues/72#issuecomment-299499744, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCfBfCi4R0Ny3eZiqrBKKjEqI4BdABZks5r20M5gaJpZM4NPesA .

-- Saumitra Bhave VJTI, Mumbai

emreayaydin commented 7 years ago

I'm looking forward to your new ANE build :)) Thank you again for best QR Code ANE and your support. You are awsome!

emreayaydin commented 7 years ago

Hello Saumitra, Have you looked this issue, when can you fix that? Of course I dont want to push you but I am really in a difficult situation. Thank you for your understanding

kryrnrj commented 7 years ago

Hi,

This is a big problem for me too. This ane is best. I want to keep using it. I can't wait for new release. It's urgent for me either. We need your help Saumitra. Also thanks for this good ane.

Thanks, Have a nice day

Erasmuz commented 7 years ago

Running into this issue too :( I'm getting an error #3500 when running on updated android devices, but the library works wonders on older devices! Thanks for a great library (I too can't wait for the updates)!

emreayaydin commented 7 years ago

Hello again Saumitra! Is there any progress about this issue? :/

saumitrabhave commented 7 years ago

Hey guys, I am really sorry, but since I created this project I switched machines and now I don't even have the things setup to make changes and build the project. Can anyone help me to create a PR, I will need someone with Mac machine with Android SDK, XCode and AIR SDK and some spare time to work with me :)

sfxworks commented 7 years ago

I can help you test with new android phones. Maybe iOS devices if I can get my hands on one.

saumitrabhave commented 7 years ago

Hey guys, sorry for taking toooo long :( .... I spent some time today on fixing this issue, can you please try out the ane at https://github.com/saumitrabhave/qr-zbar-ane/blob/android6-crash/qreader.ane and let me know if it fixes the issue in question and also that it doesn't create any new one.

PS: As I mentioned in my earlier reply, I have limited setup to do thorough testing, I would really appreciate if someone can take out some time to completely test the change, I will merge this build into master then.

sfxworks commented 7 years ago

I'm almost at the phase in my project to where I need a working QR reader. Give me a day or two and I'll have some results for you. Working on a payment API atm but I'll be going to QR right after.

emreayaydin commented 7 years ago

Yes yes yes.. you are the best! I tried and it works perfectly on android 6+ and ios. Thank you very much really you are the life saver :D

Guys we can cheer him up with a beer!

sfxworks commented 7 years ago

Hello Is this up to date? https://github.com/saumitrabhave/qr-zbar-ane/blob/master/Example/src/com/sbhave/reader/tests/SingleScanSimple.as

I tried running it, I get no errors and nothing from output, however my ui freezes. Running Android 7.0, AIR 25. Min sdk set to 14 with no default target.

        private function handleAddItemTap(e:TouchEvent):void 
        {
            trace("add item init."); //traces
            container.visible = false;
            scanner = new Scanner();
            scanner.setConfig(Symbology.QRCODE, Config.ENABLE, 1);
            scanner.addEventListener(ScannerEvent.SCAN, onQrScan);
            scanner.startPreview("back", 97, 75, 372, 280); //tried both back and rear
            scanner.attachScannerToPreview();
        }
saumitrabhave commented 7 years ago

Can you make sure that its not because of the new permissions thing on Android? You will need to use AS3 apis to request for Camera permission first.

On Fri, 7 Jul 2017 at 11:20 PM, Samuel Walker notifications@github.com wrote:

Hello Is this up to date?

https://github.com/saumitrabhave/qr-zbar-ane/blob/master/Example/src/com/sbhave/reader/tests/SingleScanSimple.as

I tried running it, I get no errors and nothing from output, however my ui freezes. Running Android 7.0, AIR 25. Min sdk set to 14 with no default target.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/saumitrabhave/qr-zbar-ane/issues/72#issuecomment-313749596, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCfBRPsofo04MzZSzWK_046njR7ce-Rks5sLm_-gaJpZM4NPesA .

-- Saumitra Bhave VJTI, Mumbai

sfxworks commented 7 years ago

Hey there. Didn't see that. I got it to work after that! I appreciate it.