java.lang.IllegalStateException: Preview mode must have started before you can take a picture

Stack Overflow | rizon | 7 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    Android CWAC Camera can't take a photo

    Stack Overflow | 7 months ago | rizon
    java.lang.IllegalStateException: Preview mode must have started before you can take a picture

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Preview mode must have started before you can take a picture

      at com.camera.CameraView.takePicture()
    2. com.camera
      CameraFragment.takePicture
      1. com.camera.CameraView.takePicture(CameraView.java:317)
      2. com.camera.CameraFragment.takePicture(CameraFragment.java:152)
      2 frames
    3. finagle-core
      PhotoFragment.onOptionsItemSelected
      1. com.PhotoFragment.takeSimplePicture(PhotoFragment.java:240)
      2. com.PhotoFragment.onOptionsItemSelected(PhotoFragment.java:123)
      2 frames