GithubHelp home page GithubHelp logo

Comments (7)

mikebuss avatar mikebuss commented on July 26, 2024

I wasn't able to reproduce this on an iPhone 6 Plus running iOS 9. I turned the capture on and waited 20 minutes but didn't see any issues. Since this is not something specific to MTBBarcodeScanner, and sounds more like an AVFoundation issue, I think your best bet is to use StackOverflow or file a bug report to Apple.

from mtbbarcodescanner.

zackfletch00 avatar zackfletch00 commented on July 26, 2024

+1, I'm having the same issue on my iPhone 6S Plus running iOS 9.3. On a seemingly random basis, sometimes as frequently as every 15-20 seconds, my session is interrupted or stopped (sometimes i get WasInterrupted notification, other times I get DidStopRunning notification). The torch also cuts off during these times. My best workaround was to observe for those notifications and call startRunning on the session and relight the torch manually each time that an interruption occurs.

This might occur more often while playing music in the background, because I have noticed few interruptions at one point while not playing music. But in further tests I can't prove a correlation – the rate of capture session stoppage is about the same even after playback is stopped. Average rate over an hour is about 75 interruptions / hour, with interruptions lasting 6-7 seconds in length (scanner unusable about 15% of the time). Interruption rate does vary, but doesn't get measurably better or worse over time as the app runs. I'll continue testing, troubleshooting, and trying solutions and post any good solutions that I find.

from mtbbarcodescanner.

zackfletch00 avatar zackfletch00 commented on July 26, 2024

Amazingly, the interruptions seem to be related to Headphones being plugged in! Unplug headphones, and no interruptions. Plug them back in, and the session is once again stopping itself. Problem solved?

from mtbbarcodescanner.

zscgeek avatar zscgeek commented on July 26, 2024

Were you ever able to track down a fix to this other then removing the headphones?

from mtbbarcodescanner.

DJM0 avatar DJM0 commented on July 26, 2024

Would love to know this as well. I had to write some hacky code to detect whether the session has crashed and restart it.

from mtbbarcodescanner.

mikebuss avatar mikebuss commented on July 26, 2024

I haven't had much luck reproducing this on my end with an iPhone 6S Plus running iOS 9.3.2. Is anyone able to reproduce this reliably with a set of steps?

I created a bare-bones implementation using AVFoundation in a separate Xcode project we can use. Hopefully this will help narrow it down a bit. If you're able to reproduce the issue in this project, please let me know, and I can investigate further (and move any fixes into MTBBarcodeScanner):
https://www.dropbox.com/s/us8eoz5bxtjxacy/SampleBarcodeProject.zip?dl=0

If this turns out to be an issue with AVFoundation, we can submit this project (and steps to reproduce) as a radar to Apple.

from mtbbarcodescanner.

hardikdevios avatar hardikdevios commented on July 26, 2024

This is more likely an issue from Apple side because the session is getting stop without no reason, i have write code with my own and same thing is happening. And yes session is getting frequent interruption while you plugin the headphones or playing music in background even if you have started camera and put it in background that also be case.

from mtbbarcodescanner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.