2015-12-12 40 views
0

我正在使用Telerik BarcodeScanner插件(http://plugins.telerik.com/cordova/plugin/barcodescanner)爲我的混合應用程序添加qr代碼掃描功能。該插件運行良好,除了平板顯示的圖像顛倒。這隻發生在平板電腦上,在手機上沒有問題。我嘗試過使用多種設備,但這一切都發生在平板設備上。BarcodeScanner圖像顛倒在平板電腦上

難道你們中的任何一個人都面臨這個問題嗎?我該如何解決它?

回答

1

我也使用這個插件!我感覺同樣的問題。

我修正了它在AndroidManifest.xml中加入screenOrientation的 掃描活動。在採取稍微留意一下你AndroidManifest.xml(它如何必須):

<activity android:clearTaskOnLaunch="true" android:screenOrientation="landscape" android:configChanges="orientation|keyboardHidden" android:exported="false" android:name="com.google.zxing.client.android.CaptureActivity" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" android:windowSoftInputMode="stateAlwaysHidden"> 
      <intent-filter> 
       <action android:name="com.google.zxing.client.android.SCAN" /> 
       <category android:name="android.intent.category.DEFAULT" /> 
      </intent-filter> 
     </activity> 

注意android:screenOrientation="landscape"增加了。不幸的是,你的觀點會停留在「風景」中,但你的相機以正確的方式顯示圖像。