0

我有一臺具有Cordova條碼掃描儀掃描UPC編號的應用程序。它在iOS上正常工作,並按預期返回結果。然而,在Android Marshmallow 6.1上,它會掃描並顯示在相機屏幕上找到的消息產品,但不會像預期的那樣向我的視圖返回任何值。我掃描了我的整個應用程序,沒有找到找到的文本產品。不確定此消息的來源是什麼。請幫忙。離子科爾多瓦條碼掃描器適用於iOS,但不適用於Android

問題仍然存在於Android 5.1上。

您可以看到此產品找到的消息。我搜索了我的應用程序代碼以及我的apis代碼。沒有用。請參考下面的網址:

https://drive.google.com/open?id=0B81YQAjfP0R2VmU2V1I1QTg3NWc

也看到了它iOS版本是功能齊全:

https://drive.google.com/open?id=0B81YQAjfP0R2RkhEeVlOVUlLUmc

請參閱下面的調試代碼。條形碼掃描器被調用時,控制檯中不會發布任何內容。 (946):turnOffButtonLight mButtonLightTimeout = 2000 D/PowerManagerService(946):在按鈕上按下按鈕,之後2000s,然後關閉按鈕! d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯爲9.0 d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯爲14.0 d/PowerManagerService(946):turnOffButtonLight mButtonLightTimeout = 2000 d/AutomaticBrightnessController(946): ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯是3.0 D/PowerManagerService(946):在按鈕上按扭並在2000年後,然後關閉按鈕! d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯爲12.0 d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯爲9.0 d/PowerManagerService(946):turnOffButtonLight mButtonLightTimeout = 2000 d/ConnectivityService(946): D/ConnectivityService(946):網絡NetworkAgentInfo [WIFI() - 109]已經滿足請求,因此NetworkAgentInfo [WIFI() - 109]的更新網絡評分爲[0121] 1.沒有變化。 D/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯是11.0 D/PowerManagerService(946):按鈕上的Trun和2000s後的Trun,然後關閉按鈕! I/ActivityManager(946):START u0 {act = com.google.zxing.client.android.SCAN cat = [android.intent.category.DEFAULT] pkg = com.test.testapp296079 cmp = com.test.testapp296079/com.google.zxing.client.android.CaptureActivity} from uid 10110 on display 0 V/WindowManager(946):addAppToken:AppWindowToken {2ac1f12b token = Token {2571457a ActivityRecord {1e190da5 u0 com.test.testapp296079/com.google。 V/WindowManager(946):添加窗口窗口{2ec02634 u0 com.test.testapp296079/com.google.zxing.client.android。 (窗口之前)添加窗口窗口{2c8f09d2 u0 SurfaceView}在14之前(Window之前)(窗口之前{Capture110} {2ec02634 u0 com.test.testapp296079/com.google.zxing.client.android.CaptureActivity}) D/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener lux爲9。0 d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯是17.0 d/PowerManagerService(946):turnOffButtonLight mButtonLightTimeout = 2000 d/AutomaticBrightnessController(946):ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯爲8.0 d/AutomaticBrightnessController(946) :ZTE_PM_LIGHT updateAmbientLux:mLightSensorListener勒克斯是110.0 d/AutomaticBrightnessController(946):updateAutoBrightness:值= 0.16730924 * 255 = 42.663857 d/AutomaticBrightnessController(946):updateAutoBrightness:mScreenAutoBrightness = 21,newScreenAutoBrightness = 43 d/DisplayPowerController(946): ZTE_PM updatePowerState mPowerRequest.dozeScreenState = 0 D/DisplayPowerController(946):ZTE_PM_PROX updatePowerState狀態= 2 d/DisplayPowerController(946):ZTE_PM_PROX禁用ProxSensor而NO useProximitySensor d/AutomaticBrightnessController(946):ZTE_PM mScreenAutoBrightnessAdjustment無變化 d/AutomaticBrightnessController(946):雙丹LightSensorchanged =真,autolcdenable =真,autobuttonEnabled =假 d/AutomaticBrightnessController(946):updateAutoBrightness:值= 0.16730924 * 255 = 42.663857 d/DisplayPowerController(946):ZTE_PM_LHX_animate mPowerState.getScreenBrightness()21 mPowerState.getActualScreenBrightness()21 d/DisplayPowerController(946):ZTE_PM_animate動畫LCD亮度至43

回答

0

好的,這真的是Android的第一個計時器問題。

結果是一個非常愚蠢的問題,是特定操作系統導致它失敗。 iOS將false作爲0和android處理爲文本字符串false。我只需要把這個條件和它的工作。

if($ scope.cancelled === 0 || $ scope.cancelled === false)

相關問題