Android Question Picture with frontal camera in android 8

Discussion in 'Android Questions' started by Humberto, Dec 17, 2018.

  1. Humberto

    Humberto Active Member Licensed User

    The application take one picture with the back camera save , switch to frontal camera and take another picture and save the picture and exit.

    This is for security application

    I tested the application in android 7.1.1 and works.
    When I try with android 8 it takes the first picture save is ready for the second and freeze.

    I wait for more then 5 minute and if you don´t press home button the screen is freezed.

    This is a transparent activity so you see the icons but you can not access them

    Wait For Camera1_PictureTaken (Data() As Byte)
    If someone could help

    Attached Files:

  2. Erel

    Erel Administrator Staff Member Licensed User

    Does it work if you sleep before reopening the camera:
    Sub ChangeCamera_Click
       frontCamera = 
    End Sub
  3. Humberto

    Humberto Active Member Licensed User

    I had the Sleep(800) just in camera1_ready but just before the first shoot.
    Now I call Sleep(800) before shoot the second and works.

    Do you believe that is better the sleep command before initialize the camera or before the shooting inside camera1_ready ?

  4. Erel

    Erel Administrator Staff Member Licensed User

    You will need to test it. Worth trying with Camera2 library.
  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