HMS-Core / hms-scan-demo

Sample code for demonstrating Huawei HMS ScanKit capabilities. It illustrates how to help developers quickly build code scanning capabilities.

Home Page:https://developer.huawei.com/consumer/en/doc/development/HMS-Guides/scan-introduction-4?ha_source=hms1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

在某些手机以及非华为平板上,打开二维码扫描,画面是倒置的

1zhangshasha1 opened this issue · comments

我用的就是hms-scan-demo,下载的是最新的demo,在SD100-6873平板上显示是倒置的,部分手机也是倒置的,SD100-6873平板的摄像头方向是270,屏幕方向0;而在有的手机上摄像头方向是270,屏幕方向0,显示的画面确是正常的;
有什么解决办法嘛?或者是你们封装的库里面是如何处理摄像头方向的?

I tried to scan a QR using Huawei Scan Kit Demo on my device, and the demo is working as expected and the camera orientation is normal.
Can you please share your Huawei Scan Kit version and a minimal reproducible project?

image

我用的就是hms-scan-demo,下载的是最新的demo,在SD100-6873平板上显示是倒置的,部分手机也是倒置的,SD100-6873平板的摄像头方向是270,屏幕方向0;而在有的手机上摄像头方向是270,屏幕方向0,显示的画面确是正常的

我用的就是hms-scan-demo,下载的是最新的demo,在SD100-6873平板上显示是倒置的,部分手机也是倒置的,SD100-6873平板的摄像头方向是270,屏幕方向0;而在有的手机上摄像头方向是270,屏幕方向0,显示的画面确是正常的;
有什么解决办法嘛?或者是你们封装的库里面是如何处理摄像头方向的?

Since the camera orientation of the mobile phones and tablets you are using is 270, update the camera.setDisplayOrientation(90) line in the CameraOperation.java class as camera.setDisplayOrientation(270) by changing the 90 value to 270. After this update the screen will not appear upside down, it will appear as it should, possibly solving your problem.

image