This repository has been archived by the owner on Oct 10, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 464
Fixed request camera permission flow to solve issue 173 #186
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the fix works for me |
@ir2pid I updated the PR. The permission should now be requested before the scanner activity is shown. Can you confirm if this fix still working for you? |
It won't work for me |
@embedur-sarathis : Which version are you using? And what does "It won't work for me" mean?
|
It works for ios. But Android, after give permission allow, then the app crash
I am using barcode_scan 2.0.2 version
Flutter version v1.16.3
Thanks,
Sarathi
…________________________________
From: Julian Finkler <[email protected]>
Sent: Tuesday, 14 April 2020, 01:19
To: mintware-de/flutter_barcode_reader
Cc: Sarathi Kannan Subramanian; Mention
Subject: Re: [mintware-de/flutter_barcode_reader] Fixed request camera permission flow to solve issue 173 (#186)
@embedur-sarathis<https://github.com/embedur-sarathis> : Which version are you using? And what does "It won't work for me" mean?
Please provide more details including
* The log output,
* your Flutter Version,
* Android / iOS Version
* A short description how to reproduce the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#186 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APFJO4FAHFYIA43SE7KFU23RMNUDFANCNFSM4KZUDP4Q>.
|
@embedur-sarathis I can't reproduce the problem on my Samsung Galaxy S8+. |
Today I updated the version 3.0.0, after barcode scanning, data is not populated in ScanResult object,
Also, none of the exception blocks not called
Here is the log :
W/ActivityThread(27646): handleWindowVisibility: no activity for token android.os.BinderProxy@b834c2b
I/DecorView(27646): createDecorCaptionView >> DecorView@fe88007[], isFloating: false, isApplication: true, hasWindowDecorCaption: false, hasWindowControllerCallback: true
D/InputTransport(27646): Input channel constructed: fd=111
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): setView = DecorView@fe88007[BarcodeScannerActivity] TM=true MM=false
D/ViewRootImpl@de539ac[MainActivity](27646): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@252797c[MainActivity]
D/InputMethodManager(27646): getNavigationBarColor() -1
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): Relayout returned: old=[0,0][1080,2340] new=[0,0][1080,2340] result=0x7 surface={true 486554333184} changed=true
D/mali_winsys(27646): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer(27646): eglCreateWindowSurface = 0x714b5b1980, 0x7148e5f010
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): MSG_RESIZED: frame=[0,0][1080,2340] ci=[0,83][0,126] vi=[0,83][0,126] or=1
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@fe88007[BarcodeScannerActivity]
D/InputMethodManager(27646): getNavigationBarColor() -855310
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@fe88007[BarcodeScannerActivity]
D/InputMethodManager(27646): getNavigationBarColor() -855310
V/InputMethodManager(27646): Starting input: tba=com.netcomm.Netcomm ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(27646): startInputInner - Id : 0
I/InputMethodManager(27646): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(27646): Input channel constructed: fd=113
D/InputTransport(27646): Input channel destroyed: fd=101
D/SurfaceView(27646): onWindowVisibilityChanged(0) true me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......I. 0,0-0,0} of ViewRootImpl@ac81cf6[BarcodeScannerActivity]
V/CameraPreview(27646): Cancelling autofocus
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): Relayout returned: old=[0,0][1080,2340] new=[0,0][1080,2340] result=0x1 surface={true 486554333184} changed=false
D/SurfaceView(27646): show() Surface(name=SurfaceView - com.netcomm.Netcomm/de.mintware.barcode_scan.BarcodeScannerActivity@fe349cd@0[27646])/@0x5d11282 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......ID 0,0-1080,1984}
D/SurfaceView(27646): surfaceCreated 1 #8 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......ID 0,0-1080,1984}
D/SurfaceView(27646): surfaceChanged (1080,1984) 1 #8 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......ID 0,0-1080,1984}
I/netcomm.Netcom(27646): Compiler allocated 4MB to compile void android.view.ViewRootImpl.performTraversals()
D/SurfaceView(27646): show() Surface(name=SurfaceView - com.netcomm.Netcomm/de.mintware.barcode_scan.BarcodeScannerActivity@fe349cd@0[27646])/@0x5d11282 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......ID 0,0-1116,1984}
D/SurfaceView(27646): surfaceChanged (1116,1984) 1 #5 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ......ID 0,0-1116,1984}
D/ViewRootImpl@de539ac[MainActivity](27646): stopped(true) old=false
D/SurfaceView(27646): windowStopped(true) false io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214} of ViewRootImpl@de539ac[MainActivity]
D/SurfaceView(27646): show() Surface(name=SurfaceView - com.netcomm.Netcomm/com.embedur.urlink.MainActivity@96c3e7b@2[27646])/@0x3432c7a io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
D/SurfaceView(27646): surfaceDestroyed callback.size 1 #1 io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
W/libEGL (27646): EGLNativeWindowType 0x7148e5b010 disconnect failed
D/SurfaceView(27646): destroy() Surface(name=SurfaceView - com.netcomm.Netcomm/com.embedur.urlink.MainActivity@96c3e7b@2[27646])/@0x3432c7a io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
D/SurfaceView(27646): onWindowVisibilityChanged(8) false io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214} of ViewRootImpl@de539ac[MainActivity]
W/libEGL (27646): EGLNativeWindowType 0x7148e1f010 disconnect failed
D/OpenGLRenderer(27646): eglDestroySurface = 0x714b257280, 0x7148e1f000
D/ViewRootImpl@de539ac[MainActivity](27646): Relayout returned: old=[0,0][1080,2340] new=[0,0][1080,2340] result=0x5 surface={false 0} changed=false
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@fe88007[BarcodeScannerActivity]
D/InputMethodManager(27646): getNavigationBarColor() -855310
D/ViewRootImpl@de539ac[MainActivity](27646): stopped(false) old=true
D/SurfaceView(27646): windowStopped(false) false io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214} of ViewRootImpl@de539ac[MainActivity]
D/ViewRootImpl@de539ac[MainActivity](27646): stopped(false) old=false
D/SurfaceView(27646): onWindowVisibilityChanged(0) true io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214} of ViewRootImpl@de539ac[MainActivity]
D/ViewRootImpl@de539ac[MainActivity](27646): Relayout returned: old=[0,0][1080,2340] new=[0,0][1080,2340] result=0x7 surface={true 486556360704} changed=true
D/mali_winsys(27646): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer(27646): eglCreateWindowSurface = 0x715dbd3080, 0x714904e010
D/SurfaceView(27646): show() Surface(name=SurfaceView - com.netcomm.Netcomm/com.embedur.urlink.MainActivity@96c3e7b@3[27646])/@0x6e7b5c9 io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
D/SurfaceView(27646): surfaceCreated 1 #8 io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
D/mali_winsys(27646): EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/SurfaceView(27646): surfaceChanged (1080,2214) 1 #8 io.flutter.view.FlutterView{96c3e7b VFE...... ........ 0,0-1080,2214}
D/ViewRootImpl@de539ac[MainActivity](27646): MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@252797c[MainActivity]
D/InputMethodManager(27646): getNavigationBarColor() -1
D/InputMethodManager(27646): prepareNavigationBarInfo() DecorView@252797c[MainActivity]
D/InputMethodManager(27646): getNavigationBarColor() -1
V/InputMethodManager(27646): Starting input: tba=com.netcomm.Netcomm ic=null mNaviBarColor -1 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager(27646): startInputInner - Id : 0
I/InputMethodManager(27646): startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport(27646): Input channel constructed: fd=103
D/InputTransport(27646): Input channel destroyed: fd=113
D/SurfaceView(27646): onWindowVisibilityChanged(8) false me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ........ 0,0-1116,1984} of ViewRootImpl@ac81cf6[BarcodeScannerActivity]
D/SurfaceView(27646): show() Surface(name=SurfaceView - com.netcomm.Netcomm/de.mintware.barcode_scan.BarcodeScannerActivity@fe349cd@0[27646])/@0x5d11282 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ........ 0,0-1116,1984}
D/SurfaceView(27646): surfaceDestroyed callback.size 0 #2 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ........ 0,0-1116,1984}
D/SurfaceView(27646): destroy() Surface(name=SurfaceView - com.netcomm.Netcomm/de.mintware.barcode_scan.BarcodeScannerActivity@fe349cd@0[27646])/@0x5d11282 me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ........ 0,0-1116,1984}
W/libEGL (27646): EGLNativeWindowType 0x7148e5f010 disconnect failed
D/OpenGLRenderer(27646): eglDestroySurface = 0x714b5b1980, 0x7148e5f000
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): Relayout returned: old=[0,0][1080,2340] new=[0,0][1080,2340] result=0x5 surface={false 0} changed=true
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): stopped(true) old=false
D/SurfaceView(27646): windowStopped(true) false me.dm7.barcodescanner.core.CameraPreview{fe349cd V.E...... ........ 0,0-1116,1984} of ViewRootImpl@ac81cf6[BarcodeScannerActivity]
D/ViewRootImpl@ac81cf6[BarcodeScannerActivity](27646): dispatchDetachedFromWindow
D/InputTransport(27646): Input channel destroyed: fd=111
Question: In the camera view, if it is there in multiple barcodes, can I able to read multiple barcodes which is there in camera view at a time?
Regards,
Sarathi
…________________________________
From: Julian Finkler <[email protected]>
Sent: 15 April 2020 00:49
To: mintware-de/flutter_barcode_reader <[email protected]>
Cc: Sarathi Kannan Subramanian <[email protected]>; Mention <[email protected]>
Subject: Re: [mintware-de/flutter_barcode_reader] Fixed request camera permission flow to solve issue 173 (#186)
@embedur-sarathis<https://github.com/embedur-sarathis> I can't reproduce the problem on my Samsung Galaxy S8+.
Please provide the log which contains a stacktrace with the crash that we can address the problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#186 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/APFJO4C5CUTTS4FXVVDJ6JDRMSZK3ANCNFSM4KZUDP4Q>.
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes the "request for camera permission" flow which previously caused an app crash which is described in #173 .
Cause:
The scanner view was created before the permission was requested.
Fix:
Create the scanner view after the permission was granted
Test: