Camera : setDisplayOrientation function is not working for Samsung Galaxy ACE with Android 2.3.6

前端 未结 3 661
死守一世寂寞
死守一世寂寞 2020-12-02 19:11

I was trying to create a simple camera application for research. I Read Android Camera Official Document and then started coding. so I did some steps to get it work

3条回答
  •  囚心锁ツ
    2020-12-02 19:34

    When I had a similar problem with the original Galaxy Tab running 2.2.1, I was able to solve it by doing the following:

    Camera.Parameters parameters = camera.getParameters();
    parameters.set("orientation", "portrait");
    parameters.setRotation(90);
    camera.setParameters(parameters);
    

    However, it looks like you may have already tried that exact combination, given that you have identical (but commented out) code above. However, the way you have the code right now, the Ace is going to bypass where you have that commented code because of it's API level (10). Try it specifically inside this block:

    if (currentSDKVersion != 7) { }
    

    And let me know if it works, please. Thanks!

提交回复
热议问题