qreader
qreader copied to clipboard
surfaceCreated not triggered on resume after unlock screen
all is going well, but if you try to press the power button (lock button) surfaceCreatedis not trigerred (SurfaceHolder.Callback surfaceHolderCallback @ line 90)
so this block (@ line 195)
public void start() { if (surfaceView != null && surfaceHolderCallback != null) { //if surface already created, we can start camera if (surfaceCreated) { startCameraView(context, cameraSource, surfaceView); } else { //startCameraView will be invoke in void surfaceCreated surfaceView.getHolder().addCallback(surfaceHolderCallback); } } }
start camera view will never be called. any fix. ?
I will have to look into this, but a dirty fix would be to restart the activity. I understand that is not what is obviously desired, but this would force the whole setup process to start again. I would, however, keep this issue open to address this in the next release.
I would, however, like to mention that I am fairly occupied at work and haven't been able to give the time this project requires from me. I am open to contributions and help. As of now, I do not have a timeline for this fix or the next release in general.
Thank you for reporting the issue anyways. I would try to fix this asap.
thanks for the reply, I'll try to have a better work around and post it here.
@ralphgabrielle Can you confirm this issue still exists based on the latest release? I have tried to simulate the issue by following the steps you mentioned and I cannot reproduce it.
Hi, I will try to the new update if the problem still persist. Thanks for the update.
http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail Virus-free. www.avg.com http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
On Sat, Nov 4, 2017 at 4:04 PM, Nishant Srivastava <[email protected]
wrote:
@ralphgabrielle https://github.com/ralphgabrielle Can you confirm this issue still exists based on the latest release? I have tried to simulate the issue by following the steps you mentioned and I cannot reproduce it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nisrulz/qreader/issues/43#issuecomment-341879509, or mute the thread https://github.com/notifications/unsubscribe-auth/AG9e9Ksqoh0VwTgneUZ4Lw9hlViVXTP4ks5szBqLgaJpZM4OM-9F .
I meet the same problem with version 2.1.2. Any progress on this? Edit: I end up with this code to fix this. Now sure why.
override fun onStart() {
super.onStart()
qrReader.initAndStart(camera)
}
override fun onResume() {
super.onResume()
qrReader.start()
}
override fun onPause() {
super.onPause()
qrReader.releaseAndCleanup()
}