Android Question Camera Preview Funnies

Discussion in 'Android Questions' started by canalrun, Feb 25, 2015.

  1. canalrun

    canalrun Well-Known Member Licensed User

    Hello,
    I have a camera app that I've been using for at least six months. It's based on CameraEx and the CCTV example.

    On the sender device, I have a small preview panel in the upper left corner and every two seconds I send the preview image to a remote device and flash an "LED" green for a quarter second or so.

    It's worked great every day for at least six months, but yesterday something strange happened.

    On the sender device the preview panel showed real-time preview images, but the sender never sent images nor flashed the LED. The only way this could possibly happen is if it was not getting the preview callbacks.

    I exited and restarted my app several times with the same results.

    After scratching my head for a few minutes, I exited my app and opened the devices default camera app for a couple seconds, then closed the devices default camera app.

    I restarted my CCTV app and it worked properly - displaying, sending, and LED blinking.

    It seems as though the default camera app reset the camera in some way that was not being done in my app. After the "more extensive" camera reset, my app worked properly.

    Has anybody experienced anything like this? Anyone have an idea why running the devices default camera app would allow my apt to start working?

    Thanks,
    Barry.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can try to add reset feature to your app. Call CamEx.CloseNow. Wait a few seconds with a timer and initialize the camera again.

    It might help with such issues. Though I did see cases where only a reboot brought the camera back to life.
     
  3. canalrun

    canalrun Well-Known Member Licensed User

    Thanks. Will try.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice