qr-zbar-ane icon indicating copy to clipboard operation
qr-zbar-ane copied to clipboard

Problem on Android 6+ with air SDK 25

Open emreayaydin opened this issue 7 years ago • 16 comments

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..

emreayaydin avatar May 03 '17 14:05 emreayaydin

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 [email protected] 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

saumitrabhave avatar May 04 '17 06:05 saumitrabhave

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

emreayaydin avatar May 05 '17 15:05 emreayaydin

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 [email protected] 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

saumitrabhave avatar May 05 '17 21:05 saumitrabhave

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

emreayaydin avatar May 07 '17 19:05 emreayaydin

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

emreayaydin avatar May 11 '17 14:05 emreayaydin

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

kryrnrj avatar May 12 '17 07:05 kryrnrj

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)!

Erasmuz avatar May 26 '17 15:05 Erasmuz

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

emreayaydin avatar Jun 02 '17 09:06 emreayaydin

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 :)

saumitrabhave avatar Jun 02 '17 12:06 saumitrabhave

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

sfxworks avatar Jun 25 '17 00:06 sfxworks

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.

saumitrabhave avatar Jun 26 '17 14:06 saumitrabhave

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.

sfxworks avatar Jun 26 '17 16:06 sfxworks

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!

emreayaydin avatar Jun 28 '17 09:06 emreayaydin

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();
		}

sfxworks avatar Jul 07 '17 17:07 sfxworks

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 [email protected] 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

saumitrabhave avatar Jul 07 '17 18:07 saumitrabhave

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

sfxworks avatar Jul 07 '17 19:07 sfxworks