我正在使用最新版本的Codova(1.5.0)实现ZXing Phonegap插件,并且该插件大部分都在使用。
麻烦的是,当条形码成功扫描时,它不会返回我的成功回叫,而是显示二进制ZXing应用程序附带的标准共享/查找按钮。
任何人都知道为什么会这样?
下面是用于执行应用程序的LogCat输出,我可以看到CaptureActivityHandler消息。
04-02 15:03:14.107: I/CordovaLog(21260): Changing log level to DEBUG(3)
04-02 15:03:14.107: D/DroidGap(21260): DroidGap.onCreate()
04-02 15:03:14.117: D/DroidGap(21260): DroidGap.loadUrl(file:///android_asset/www/index.html)
04-02 15:03:14.117: D/DroidGap(21260): DroidGap: url=file:///android_asset/www/index.html baseUrl=file:///android_asset/www/
04-02 15:03:14.117: D/DroidGap(21260): DroidGap.init()
04-02 15:03:14.237: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/webview.db, flag = 6, file size = 15360
04-02 15:03:14.247: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/webview.db, mode: wal, disk free size: 827 M, handle: 0x34d260
04-02 15:03:14.277: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/webviewCache.db, flag = 6, file size = 6144
04-02 15:03:14.397: I/Database(21260): sqlite returned: error code = 0, msg = Recovered 18 frames from WAL file /data/data/quidsin.qpeesmerchantapp/databases/webviewCache.db-wal
04-02 15:03:14.397: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/webviewCache.db, mode: wal, disk free size: 827 M, handle: 0x34eed0
04-02 15:03:14.628: D/skia(21260): htcFlashPlugin::htcFlashPlugin
04-02 15:03:14.628: D/qct(21260): [WebView.WebView] >> Enable Shutdown = true
04-02 15:03:14.638: D/qct(21260): [PreConnectionManager.PreConnectionManager] >> TCP_PRE_CONNECT = false
04-02 15:03:14.698: D/qct(21260): [RequestQueue.ActivePool.ActivePool] >> Enable Shutdown = true
04-02 15:03:14.698: D/qct(21260): [IdleCache.IdleCache] >> IDLE_CACHE_MAX = 40
04-02 15:03:14.758: D/ATRecorder(21260): com.htc.autotest.dlib.RecordEngine in loader dalvik.system.DexClassLoader@4053c1e0
04-02 15:03:14.788: D/SoftKeyboardDetect(21260): Ignore this event
04-02 15:03:15.018: W/webcore(21260): Not supported in this case.
04-02 15:03:15.018: D/SoftKeyboardDetect(21260): Ignore this event
04-02 15:03:15.348: D/webkit-timers(21260): [JWebCoreJavaBridge::resume] >> do resume
04-02 15:03:15.478: D/szipinf(21260): Initializing inflate state
04-02 15:03:15.478: D/szipinf(21260): Initializing inflate state
04-02 15:03:15.478: D/szipinf(21260): Initializing inflate state
04-02 15:03:15.478: D/szipinf(21260): Initializing zlib to inflate
04-02 15:03:15.478: D/szipinf(21260): Initializing zlib to inflate
04-02 15:03:15.528: D/szipinf(21260): Initializing zlib to inflate
04-02 15:03:17.991: I/Database(21260): sqlite returned: error code = 14, msg = cannot open file at line 27206 of [42537b6056]
04-02 15:03:19.142: D/RequestQueue(21260): setProxyConfig: wifi enabled.
04-02 15:03:19.142: D/RequestQueue(21260): setProxyConfig mProxyHost=null
04-02 15:03:19.422: D/webkit-timers(21260): [JWebCoreJavaBridge::pause] >> do pause
04-02 15:03:19.903: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, flag = 6, file size = 4096
04-02 15:03:19.913: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, mode: wal, disk free size: 827 M, handle: 0x4db5a8
04-02 15:03:19.953: D/Database(21260): dbclose(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, handle = 0x4db5a8
04-02 15:03:20.073: I/AudioSystem(21260): getting audio flinger
04-02 15:03:20.093: I/AudioSystem(21260): returning new audio session id
04-02 15:03:20.093: D/IAudioFlinger(21260): newAudioSessionId In
04-02 15:03:20.103: D/IAudioFlinger(21260): newAudioSessionId Out, id = 721
04-02 15:03:22.395: D/CameraConfigurationManager(21260): Default preview format: 17/yuv420sp
04-02 15:03:22.425: D/CameraConfigurationManager(21260): Screen resolution: Point(960, 540)
04-02 15:03:22.425: D/CameraConfigurationManager(21260): preview-size-values parameter: 1280x720,960x544,800x480,640x480,480x320
04-02 15:03:22.425: D/CameraConfigurationManager(21260): Camera resolution: Point(960, 544)
04-02 15:03:22.425: D/CameraConfigurationManager(21260): Setting preview size: Point(960, 544)
04-02 15:03:22.886: D/CameraManager(21260): Calculated framing rect: Rect(240, 90 - 720, 450)
*** SNIPPED GC ***
04-02 15:03:28.501: D/CaptureActivityHandler(21260): Got decode succeeded message
04-02 15:03:28.541: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, flag = 6, file size = 4096
04-02 15:03:28.551: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, mode: wal, disk free size: 827 M, handle: 0x51ec10
04-02 15:03:28.711: D/Database(21260): dbclose(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, handle = 0x51ec10
04-02 15:03:28.741: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, flag = 6, file size = 4096
04-02 15:03:28.741: D/Database(21260): dbopen(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, mode: wal, disk free size: 827 M, handle: 0x51ec10
04-02 15:03:28.821: D/Database(21260): dbclose(): path = /data/data/quidsin.qpeesmerchantapp/databases/barcode_scanner_history.db, handle = 0x51ec10
04-02 15:03:28.851: D/MediaPlayer(21260): start() in
04-02 15:03:28.901: D/MediaPlayer(21260): start() out
04-02 15:03:28.952: D/Camera(21260): HTC_CALLBACK: callbackType=5 arg1=1 arg2=0 mHtcCallback=null
04-02 15:03:30.523: D/ProductResultInfoRetriever(21260): Consuming entity
04-02 15:03:36.008: W/KeyCharacterMap(21260): Can't open keycharmap file
04-02 15:03:36.008: W/KeyCharacterMap(21260): Error loading keycharmap file '/system/usr/keychars/cy8c-touchscreen.kcm.bin'. hw.keyboards.65538.devname='cy8c-touchscreen'
04-02 15:03:36.008: I/KeyCharacterMap(21260): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
04-02 15:03:36.018: D/CaptureActivityHandler(21260): Got restart preview message
*** SNIPPED GC ***
04-02 15:03:36.979: W/KeyCharacterMap(21260): Can't open keycharmap file
04-02 15:03:36.979: W/KeyCharacterMap(21260): Error loading keycharmap file '/system/usr/keychars/cy8c-touchscreen.kcm.bin'. hw.keyboards.65538.devname='cy8c-touchscreen'
04-02 15:03:36.979: I/KeyCharacterMap(21260): Using default keymap: /system/usr/keychars/qwerty.kcm.bin
04-02 15:03:37.099: V/FlashlightManager(21260): This device does not support control of a flashlight
04-02 15:03:37.109: D/Camera-JNI(21260): native_release: context=0x3a7848 camera=0x4be5c8
04-02 15:03:37.620: D/webkit-timers(21260): [JWebCoreJavaBridge::resume] >> do resume
TIA
罗布