Android Question Can not initialize internal camera!!!

Discussion in 'Android Questions' started by Kang-hung Yang, Apr 18, 2019.

  1. Kang-hung Yang

    Kang-hung Yang Member Licensed User

    I found a very strange problem. I downloaded the tutorial example cameraExample for practice, use it and it seemed work well. But if I typed the code followed by the example exactly the same, including manifest file, the camera can't initialize. My B4A is ver 9.00. Windows ver. is Chinese Win10 64 bit. is anything extra settings I have to do or something wrong. I also bought a book, and use the example from the book, the same thing happened, if I typed the code by myself, the camera is not initialize, but if I used the file from the book CD, it works. Please help, thanks.
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are there any error messages in the logs?
     
  3. Kang-hung Yang

    Kang-hung Yang Member Licensed User

    not have any error message, BTW, Button is normal, since I test some easy code, such as I put activity.finish. Only camera can not be initialized, no image on the Panel.
     
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. Kang-hung Yang

    Kang-hung Yang Member Licensed User

    I downloaded the tutorial examples of cameraExample and cameraEx for practice, the downloaded files works well and can be run on my mobile. However, if I typed the exact same codes by myself, the camera can't be initialized. But at the same time, other object, like Button is normal and can be executed. There are no error message in logs while compiling.
     
  6. José J. Aguilar

    José J. Aguilar Active Member Licensed User

    Have you added the same libraries than the original sample?
     
  7. Kang-hung Yang

    Kang-hung Yang Member Licensed User

    yes
     
  8. José J. Aguilar

    José J. Aguilar Active Member Licensed User

    Could you post your logs? It would help
    Or even your project.
     
  9. Kang-hung Yang

    Kang-hung Yang Member Licensed User

    nothing shows in Logs.
    What I did is change <uses-sdk android:minSdkVersion="4" > to <uses-sdk android:minSdkVersion="4" android:targetSdkVersion="26" /> in the manifest file.
     
  10. Erel

    Erel Administrator Staff Member Licensed User

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