ZXing onActivityResult未多次调用

时间:2013-09-02 07:39:48

标签: android camera zxing

我正在尝试将ZXing集成到我的项目中,但遇到了问题。它在第一次扫描和第二次扫描时正常工作。但是在第三次+扫描时,onActivityResult方法永远不会被触发。

这是我开始扫描的地方:

public void performScan(){
IntentIntegrator scanIntegrator = new IntentIntegrator(thisActivity);
                scanIntegrator.initiateScan();
}

这是我的onActivityResult方法:

@Override
    public void onActivityResult(int requestCode, int resultCode, Intent intent) {
        super.onActivityResult(requestCode, resultCode, intent);
    //retrieve scan result
        Log.w("ZZ", activityName + ": onActivityResult ... requestCode=" + requestCode + " ... resultCode=" + resultCode);
        //BT_debugger.showIt(activityName + ": onActivityResult ... requestCode=" + requestCode + " ... resultCode=" + resultCode);
        if (resultCode == RESULT_OK){
        IntentResult scanningResult = IntentIntegrator.parseActivityResult(requestCode, resultCode, intent);
        if (scanningResult != null) {
            //we have a result
            String scanContent = scanningResult.getContents();
            //resultText.setText(scanContent);
            if (scanContent.length()>0) loadQuestion(scanContent);
            else {
                Toast toast = Toast.makeText(getApplicationContext(),
                        "No scan data received!", Toast.LENGTH_SHORT);
                toast.show();
            }
        }
        else{
            Toast toast = Toast.makeText(getApplicationContext(),
                    "No scan data received!", Toast.LENGTH_SHORT);
            toast.show();
        }
        }
    }

这是生成的LogCat,从扫描开始不起作用。

09-02 01:24:48.310    435-13722/? I/ActivityManager: START u0 {act=com.google.zxing.client.android.SCAN cat=[android.intent.category.DEFAULT] flg=0x4080000 pkg=com.google.zxing.client.android cmp=com.google.zxing.client.android/.CaptureActivity} from pid 8312
09-02 01:24:48.310    435-13722/? W/ActivityManager: startActivity called from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for: Intent { act=com.google.zxing.client.android.SCAN cat=[android.intent.category.DEFAULT] flg=0x4080000 pkg=com.google.zxing.client.android cmp=com.google.zxing.client.android/.CaptureActivity }
09-02 01:24:48.340    8312-8312/com.testrotary I/Choreographer: Skipped 50 frames!  The application may be doing too much work on its main thread.
09-02 01:24:48.410    8312-8312/com.testrotary W/ZZ: Cr_rr_qrreader:onPause (BASE CLASS)
09-02 01:24:48.430      435-682/? I/ActivityManager: Config changes=1480 {1.0 310mcc?mnc en_US ldltr sw600dp w961dp h528dp 213dpi lrg land finger -keyb/v/h -nav/h s.259}
09-02 01:24:48.550      435-487/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
09-02 01:24:48.550      435-487/? I/InputReader: Device reconfigured: id=2, name='elan-touchscreen', size 800x1280, orientation 1, mode 1, display id 0
09-02 01:24:48.550      435-487/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
09-02 01:24:48.550      435-487/? I/InputReader: Device reconfigured: id=2, name='elan-touchscreen', size 800x1280, orientation 1, mode 1, display id 0
09-02 01:24:48.620    4263-4271/? W/MediaPlayer-JNI: MediaPlayer finalized without being released
09-02 01:24:48.620    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 407K, 13% free 8241K/9396K, paused 7ms+26ms, total 63ms
09-02 01:24:48.640    4263-4263/? I/PlatformSupportManager: Using implementation class com.google.zxing.client.android.common.executor.HoneycombAsyncTaskExecInterface of interface com.google.zxing.client.android.common.executor.AsyncTaskExecInterface for SDK 11
09-02 01:24:48.720      520-520/? D/PhoneStatusBar: mSettingsPanelGravity = 8388661
09-02 01:24:48.760    8312-8312/com.testrotary W/ZZ: testrotary_appDelegate: onTrimMemory with level: 20
09-02 01:24:48.820    4263-4263/? I/com.google.zxing.client.android.camera.open.OpenCameraInterface: No camera facing back; returning camera #0
09-02 01:24:48.820      125-459/? I/AwesomePlayer: setDataSource_l(URL suppressed)
09-02 01:24:48.850    3245-3249/? D/dalvikvm: GC_CONCURRENT freed 386K, 8% free 7878K/8488K, paused 72ms+2ms, total 188ms
09-02 01:24:48.860      125-459/? I/AwesomePlayer: setDataSource_l(URL suppressed)
09-02 01:24:48.890      125-459/? I/CameraClient: Opening camera 0
09-02 01:24:48.890      125-459/? I/NvOmxCamera: HAL_camera_device_open: open camera 0
09-02 01:24:48.920     125-8922/? E/: ioctl SetWhiteBalance failed: -1
09-02 01:24:48.920      125-459/? E/NvOmxCameraSettingsParser: Param type 70 not supported
09-02 01:24:48.920      125-459/? I/NvOmxCamera: HAL_camera_device_open: opened camera 0 (0x4761bb20)
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Screen resolution: Point(1280, 736)
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Supported preview sizes: 1280x720 960x720 720x576 704x576 800x448 720x480 768x432 640x480 720x408 480x480 352x288 320x240 176x144
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Using largest suitable preview size: Point(1280, 720)
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Camera resolution: Point(1280, 720)
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Initial camera parameters: preferred-preview-size-for-video=720x576;rotation-values=0,90,180,270;zoom=0;recording-hint=false;max-num-detected-faces-hw=0;video-stabilization=false;zoom-supported=true;whitebalance=auto;video-stabilization-values=false,true;jpeg-quality=95;nv-flip-preview=off;preview-format-values=yuv420p,yuv420sp;rotation=0;jpeg-thumbnail-quality=90;preview-format=yuv420sp;metering-areas=(0,0,0,0,0);video-frame-format-values=yuv420p;video-size-values=40x30,176x144,320x240,352x288,640x480,704x576,720x480,720x576,768x432,1280x720;nv-flip-preview-values=off,vertical,horizontal,both;preview-size=320x240;focal-length=2.080;preview-frame-rate-values=5,8,10,15,20,24,25,30;max-num-metering-areas=0;preview-frame-rate=30;nv-flip-still=off;focus-mode-values=fixed;jpeg-thumbnail-width=320;video-size=1280x720;preview-fps-range-values=(4000,60000);jpeg-thumbnail-size-values=0x0,320x240;zoom-ratios=100,125,150,175,200,225,250,275,300,325,350,375,400,425,450,475,500,525,550,575,600,625,650,675,700,725,750,775,800;preview-size-values=176x144,320x240,352x288,480x480,640x480,704x576,720x408,720x480,720x576,768x432,800x448,960x720,1280x720;recording-hint-values=false,true;picture-size-values=320x240,480x480,640x480,800x600,1024x768,1280x720,1280x960;preview-fps-range=4000,60000;auto-whitebalance-lock=false;min-exposure-compensation=-20;antibanding=off;max-num-focus-areas=0;vertical-view-angle=72.600;horizontal-view-angle=72.600;video-stabilization-supported=false;jpeg-thumbnail-height=240;smooth-zoom-supported=true;focus-mode=fixed;nv-flip-still-values=off,vertical,horizontal,both;auto-whitebalance-lock-supported=true;video-frame-format=yuv420p;picture-format-values=jpeg,jfif,exif;max-exposure-compensation=20;video-snapshot-supported=true;exposure-compensation=0;exposure-compensation-step=0.1;auto-exposure-lock=false;effect-values=mono,negative,none,posterize,sepia,aqua,solarize,nv-vivid,nv-emboss;picture-size=1280x960;max-zoom=28;effect=none;whitebalance-values=auto,incandescent,fluorescent,daylight;picture-format=jpeg;focus-distances=0.95,1.9,Infinity;auto-exposure-lock-values=false,true;auto-exposure-lock-supported=true;auto-whitebalance-lock-values=false,true;antibanding-values=off,auto,50hz,60hz
09-02 01:24:48.930    4263-4263/? I/CameraConfiguration: Supported values: null
09-02 01:24:48.940    4263-4263/? I/CameraConfiguration: Settable value: null
09-02 01:24:48.940    4263-4263/? I/CameraConfiguration: Supported values: [fixed]
09-02 01:24:48.940    4263-4263/? I/CameraConfiguration: Settable value: null
09-02 01:24:48.940    4263-4263/? I/CameraConfiguration: Supported values: [fixed]
09-02 01:24:48.940    4263-4263/? I/CameraConfiguration: Settable value: null
09-02 01:24:48.940    4263-4263/? I/DecodeThread: Hints: {POSSIBLE_FORMATS=[CODABAR, CODE_39, CODE_93, CODE_128, DATA_MATRIX, EAN_8, EAN_13, ITF, QR_CODE, RSS_14, RSS_EXPANDED, UPC_A, UPC_E], NEED_RESULT_POINT_CALLBACK=com.google.zxing.client.android.ViewfinderResultPointCallback@420c8040}
09-02 01:24:48.960     125-8929/? D/NvOsDebugPrintf: NvMMLiteBlockCreate : Block : BlockType = 1
09-02 01:24:48.970     125-8929/? D/NvOsDebugPrintf: NvMMLiteJPEGEncGetBufferRequirements : BufferSize 1843200
09-02 01:24:49.020     125-8922/? D/: Camera fd open as: 151
09-02 01:24:49.550     125-8929/? D/NvOsDebugPrintf: Image Physically rotated in DZ
09-02 01:24:49.550     125-8929/? D/NvOsDebugPrintf: NvMMExif_Orientation_0_Degrees= 1
09-02 01:24:49.550      125-889/? E/NvOmxCamera: OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoMode(NvxComponent*, NvOmxCameraUserStereoMode&): Error: invalid NVX mode 0.
09-02 01:24:49.550      125-889/? E/NvOmxCamera: OMX_ERRORTYPE android::NvOmxCamera::getCameraStereoModeAndCaptureInfo(NvxComponent*, NvOmxCameraUserStereoMode&, NVX_STEREOCAPTUREINFO&): getCameraStereoMode failed with 0x00000000
09-02 01:24:49.580    4263-4263/? I/PlatformSupportManager: Using implementation class com.google.zxing.client.android.common.executor.HoneycombAsyncTaskExecInterface of interface com.google.zxing.client.android.common.executor.AsyncTaskExecInterface for SDK 11
09-02 01:24:49.580    4263-4263/? I/AutoFocusManager: Current focus mode 'fixed'; use auto focus? false
09-02 01:24:49.600    4263-4263/? I/Choreographer: Skipped 47 frames!  The application may be doing too much work on its main thread.
09-02 01:24:49.610    4263-4263/? D/CameraManager: Calculated framing rect: Rect(240, 138 - 1040, 598)
09-02 01:24:49.680      435-451/? I/ActivityManager: Displayed com.google.zxing.client.android/.CaptureActivity: +1s277ms
09-02 01:24:49.680      435-606/? W/InputMethodManagerService: Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy@42ac36f8 (uid=10069 pid=8312)
09-02 01:24:49.690    8312-8312/com.testrotary W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
09-02 01:24:49.700      122-159/? I/hwcomposer: Setting interactive mode: Off
09-02 01:24:49.740      435-451/? I/WindowManager: Screen frozen for +1s332ms due to Window{425238e0 u0 Starting com.google.zxing.client.android}
09-02 01:24:49.790    4263-4273/? D/dalvikvm: GC_FOR_ALLOC freed 173K, 12% free 8309K/9396K, paused 95ms, total 95ms
09-02 01:24:49.800    4263-4273/? I/dalvikvm-heap: Grow heap (frag case) to 9.491MB for 1382416-byte allocation
09-02 01:24:49.820      122-159/? I/hwcomposer: Setting interactive mode: On
09-02 01:24:49.840    4263-4263/? D/dalvikvm: GC_FOR_ALLOC freed 2K, 11% free 9656K/10748K, paused 38ms, total 38ms
09-02 01:24:49.890    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 4K, 11% free 9654K/10748K, paused 3ms+2ms, total 51ms
09-02 01:24:49.940    8312-8312/com.testrotary W/ZZ: Cr_rr_qrreader:onStop (BASE CLASS)
09-02 01:24:50.100    4263-7700/? D/dalvikvm: GC_FOR_ALLOC freed 1791K, 23% free 8304K/10748K, paused 27ms, total 27ms
09-02 01:24:50.100    4263-7700/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:50.130    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 29ms, total 29ms
09-02 01:24:50.150      122-159/? I/hwcomposer: Setting interactive mode: Off
09-02 01:24:50.170    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 4K, 11% free 9657K/10748K, paused 3ms+10ms, total 41ms
09-02 01:24:50.350    4263-4274/? D/dalvikvm: GC_FOR_ALLOC freed 1780K, 23% free 8304K/10748K, paused 28ms, total 28ms
09-02 01:24:50.350    4263-4274/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:50.380    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 23ms, total 23ms
09-02 01:24:50.410    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 6K, 11% free 9656K/10748K, paused 3ms+4ms, total 29ms
09-02 01:24:50.600    4263-4273/? D/dalvikvm: GC_FOR_ALLOC freed 1780K, 23% free 8304K/10748K, paused 30ms, total 30ms
09-02 01:24:50.600    4263-4273/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:50.630    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 28ms, total 28ms
09-02 01:24:50.660    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 7K, 11% free 9656K/10748K, paused 9ms+1ms, total 33ms
09-02 01:24:50.800    4263-4546/? D/dalvikvm: GC_FOR_ALLOC freed 1777K, 23% free 8304K/10748K, paused 26ms, total 26ms
09-02 01:24:50.800    4263-4546/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:50.820    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 18ms, total 18ms
09-02 01:24:50.850    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 5K, 11% free 9657K/10748K, paused 5ms+3ms, total 28ms
09-02 01:24:50.960    4263-7700/? D/dalvikvm: GC_FOR_ALLOC freed 1781K, 23% free 8304K/10748K, paused 17ms, total 17ms
09-02 01:24:50.960    4263-7700/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:50.980    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 21ms, total 21ms
09-02 01:24:51.010    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 6K, 11% free 9656K/10748K, paused 9ms+2ms, total 28ms
09-02 01:24:51.200    4263-4274/? D/dalvikvm: GC_FOR_ALLOC freed 1777K, 23% free 8304K/10748K, paused 25ms, total 25ms
09-02 01:24:51.200    4263-4274/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:51.220    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 19ms, total 19ms
09-02 01:24:51.260    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 9K, 11% free 9656K/10748K, paused 9ms+5ms, total 34ms
09-02 01:24:51.410    4263-4273/? D/dalvikvm: GC_FOR_ALLOC freed 1775K, 23% free 8304K/10748K, paused 23ms, total 23ms
09-02 01:24:51.410    4263-4273/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:51.430    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 24ms, total 24ms
09-02 01:24:51.470    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 1K, 11% free 9656K/10748K, paused 2ms+4ms, total 40ms
09-02 01:24:51.640    4263-4546/? D/dalvikvm: GC_FOR_ALLOC freed 1785K, 23% free 8304K/10748K, paused 16ms, total 16ms
09-02 01:24:51.640    4263-4546/? I/dalvikvm-heap: Grow heap (frag case) to 9.487MB for 1382416-byte allocation
09-02 01:24:51.660    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 25ms, total 25ms
09-02 01:24:51.690    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 5K, 11% free 9656K/10748K, paused 2ms+3ms, total 30ms
09-02 01:24:51.870    4263-7700/? D/dalvikvm: GC_FOR_ALLOC freed 1779K, 23% free 8304K/10748K, paused 21ms, total 21ms
09-02 01:24:51.870    4263-7700/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:51.890      435-451/? D/dalvikvm: GC_EXPLICIT freed 1189K, 27% free 20885K/28352K, paused 13ms+10ms, total 135ms
09-02 01:24:51.890    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed 0K, 11% free 9654K/10748K, paused 25ms, total 25ms
09-02 01:24:51.920    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 8K, 11% free 9656K/10748K, paused 3ms+3ms, total 27ms
09-02 01:24:52.100    4263-4546/? D/dalvikvm: GC_FOR_ALLOC freed 1778K, 23% free 8304K/10748K, paused 42ms, total 42ms
09-02 01:24:52.100    4263-4546/? I/dalvikvm-heap: Grow heap (frag case) to 9.486MB for 1382416-byte allocation
09-02 01:24:52.150    4263-4271/? D/dalvikvm: GC_FOR_ALLOC freed <1K, 11% free 9654K/10748K, paused 47ms, total 47ms
09-02 01:24:52.170    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 5K, 11% free 9656K/10748K, paused 3ms+6ms, total 24ms
09-02 01:24:52.260    4263-8928/? D/DecodeHandler: Found barcode in 105 ms
09-02 01:24:52.300    4263-8928/? D/dalvikvm: GC_FOR_ALLOC freed 432K, 11% free 9655K/10748K, paused 45ms, total 45ms
09-02 01:24:52.350    4263-4267/? D/dalvikvm: GC_CONCURRENT freed 2K, 4% free 10369K/10748K, paused 8ms+3ms, total 33ms
09-02 01:24:52.350    4263-8928/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 7ms
09-02 01:24:52.350    4263-4263/? D/CaptureActivityHandler: Got decode succeeded message
09-02 01:24:52.380    4263-4263/? D/dalvikvm: GC_FOR_ALLOC freed 2077K, 22% free 8666K/11100K, paused 18ms, total 18ms
09-02 01:24:53.990    4263-4263/? D/CaptureActivityHandler: Got return scan result message
09-02 01:24:54.160     125-8922/? D/: Camera fd close (MI1040)
09-02 01:24:54.220      125-481/? E/NvOmxCamera: Already called release()
09-02 01:24:54.220      125-481/? I/CameraClient: Destroying camera 0
09-02 01:24:54.220      125-481/? W/NvOmxCamera: Already called release()
09-02 01:24:54.230      125-459/? W/AudioFlinger: session id 3092 not found for pid 125
09-02 01:24:54.230      125-459/? W/AudioFlinger: session id 3093 not found for pid 125
09-02 01:24:54.270      435-487/? I/InputReader: Reconfiguring input devices.  changes=0x00000004
09-02 01:24:54.270      435-487/? I/InputReader: Device reconfigured: id=2, name='elan-touchscreen', size 800x1280, orientation 0, mode 1, display id 0
09-02 01:24:54.270     435-1814/? I/ActivityManager: Config changes=1480 {1.0 310mcc?mnc en_US ldltr sw600dp w600dp h880dp 213dpi lrg port finger -keyb/v/h -nav/h s.260}
09-02 01:24:54.310    8312-8312/com.testrotary W/ZZ: Cr_rr_qrreader:onStart (BASE CLASS)
09-02 01:24:54.310    8312-8312/com.testrotary W/ZZ: Cr_rr_qrreader: start GPS is set to NO in the applications configuration data, not starting GPS
09-02 01:24:54.310    8312-8312/com.testrotary W/ZZ: Cr_rr_qrreader:onResume (BASE CLASS)
09-02 01:24:54.330      122-159/? I/hwcomposer: Setting interactive mode: On
09-02 01:24:54.390    4263-4263/? W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection
09-02 01:24:54.400      520-520/? D/PhoneStatusBar: mSettingsPanelGravity = 8388661
09-02 01:24:54.420      520-520/? V/PhoneStatusBar: setLightsOn(true)
09-02 01:24:54.450  14442-14445/? D/dalvikvm: GC_CONCURRENT freed 383K, 6% free 7613K/8068K, paused 1ms+3ms, total 147ms
09-02 01:24:54.540      435-451/? I/WindowManager: Screen frozen for +302ms due to Window{4237e0a8 u0 com.testrotary/com.testrotary.Cr_rr_qrreader}
09-02 01:24:56.650      435-451/? D/dalvikvm: GC_EXPLICIT freed 631K, 26% free 21049K/28352K, paused 15ms+9ms, total 111ms
09-02 01:30:01.270  14442-14442/? V/DigitalWidgetViewsFactory: DigitalWidget sets next alarm string to null
09-02 01:30:24.050      435-508/? I/ActivityManager: Start proc com.google.android.apps.currents for service com.google.android.apps.currents/com.google.apps.dots.android.app.service.SyncService: pid=9079 uid=10009 gids={50009, 3003, 1015, 1028}
09-02 01:30:24.450    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 266K, 5% free 7663K/7992K, paused 4ms+1ms, total 31ms
09-02 01:30:24.450    9079-9097/? D/ActivityThread: Loading provider com.google.android.apps.currents: com.google.apps.dots.android.currents.provider.CurrentsContentProvider
09-02 01:30:24.560    9079-9079/? W/GAV2: Thread[main,5,main]: Need to call initialize() and be in fallback mode to start dispatch.
09-02 01:30:24.740    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 341K, 5% free 7833K/8236K, paused 2ms+2ms, total 20ms
09-02 01:30:24.740    9079-9079/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 5ms
09-02 01:30:24.740    9079-9079/? I/DotsApplication: Starting up...
09-02 01:30:24.760    9079-9107/? I/SyncService: Starting background sync (01:30:24)
09-02 01:30:27.260    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 249K, 4% free 7985K/8296K, paused 6ms+3ms, total 23ms
09-02 01:30:27.890    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 337K, 5% free 8077K/8476K, paused 3ms+3ms, total 30ms
09-02 01:30:27.990    9079-9110/? D/dalvikvm: GC_FOR_ALLOC freed 111K, 4% free 8289K/8628K, paused 16ms, total 16ms
09-02 01:30:28.020    9079-9110/? D/dalvikvm: GC_FOR_ALLOC freed 348K, 7% free 8278K/8840K, paused 15ms, total 15ms
09-02 01:30:28.510    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 497K, 7% free 8285K/8848K, paused 2ms+3ms, total 23ms
09-02 01:30:28.620    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 258K, 4% free 8517K/8848K, paused 3ms+5ms, total 26ms
09-02 01:30:28.680    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 271K, 4% free 8750K/9088K, paused 2ms+2ms, total 20ms
09-02 01:30:28.680    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 7ms
09-02 01:30:28.730    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 285K, 4% free 8972K/9324K, paused 3ms+2ms, total 25ms
09-02 01:30:28.730    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 10ms
09-02 01:30:28.790    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 335K, 5% free 9136K/9540K, paused 3ms+2ms, total 26ms
09-02 01:30:28.790    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 4ms
09-02 01:30:28.840    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 403K, 5% free 9209K/9680K, paused 2ms+2ms, total 24ms
09-02 01:30:29.160    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 433K, 6% free 9275K/9776K, paused 5ms+2ms, total 35ms
09-02 01:30:29.620    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 488K, 6% free 9280K/9836K, paused 3ms+3ms, total 31ms
09-02 01:30:29.760    9079-9102/? I/GAV2: Thread[GAThread,5,main]: No campaign data found.
09-02 01:30:29.930    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 469K, 6% free 9405K/9940K, paused 2ms+3ms, total 26ms
09-02 01:30:30.000    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 542K, 7% free 9415K/10108K, paused 3ms+1ms, total 22ms
09-02 01:30:30.000    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 19ms
09-02 01:30:30.100    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 496K, 7% free 9479K/10108K, paused 3ms+2ms, total 26ms
09-02 01:30:30.340    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 712K, 8% free 9403K/10184K, paused 2ms+3ms, total 25ms
09-02 01:30:30.560    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 633K, 8% free 9415K/10184K, paused 2ms+2ms, total 28ms
09-02 01:30:30.560    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 7ms
09-02 01:30:30.770    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 505K, 7% free 9512K/10184K, paused 3ms+2ms, total 26ms
09-02 01:30:30.990    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 633K, 7% free 9529K/10232K, paused 3ms+3ms, total 30ms
09-02 01:30:31.090    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 627K, 7% free 9585K/10280K, paused 1ms+2ms, total 25ms
09-02 01:30:31.090    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 8ms
09-02 01:30:31.200    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 560K, 7% free 9625K/10280K, paused 1ms+2ms, total 24ms
09-02 01:30:31.490    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 696K, 8% free 9611K/10376K, paused 2ms+2ms, total 25ms
09-02 01:30:31.630    9079-9110/? D/dalvikvm: GC_FOR_ALLOC freed 344K, 7% free 9653K/10376K, paused 22ms, total 22ms
09-02 01:30:31.690    9079-9110/? D/dalvikvm: GC_FOR_ALLOC freed 481K, 8% free 9669K/10444K, paused 21ms, total 21ms
09-02 01:30:31.790    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 615K, 7% free 9780K/10464K, paused 3ms+2ms, total 27ms
09-02 01:30:31.790    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 6ms
09-02 01:30:32.020    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 752K, 8% free 9789K/10612K, paused 3ms+2ms, total 28ms
09-02 01:30:32.020    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 12ms
09-02 01:30:32.350    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 844K, 9% free 9710K/10624K, paused 3ms+2ms, total 27ms
09-02 01:30:32.350    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 11ms
09-02 01:30:32.570    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 708K, 9% free 9724K/10624K, paused 3ms+1ms, total 27ms
09-02 01:30:32.770    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 710K, 9% free 9764K/10624K, paused 4ms+2ms, total 30ms
09-02 01:30:32.770    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 13ms
09-02 01:30:33.140    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 826K, 9% free 9702K/10624K, paused 2ms+2ms, total 26ms
09-02 01:30:33.140    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 8ms
09-02 01:30:33.320    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 677K, 9% free 9757K/10624K, paused 3ms+2ms, total 27ms
09-02 01:30:33.630      435-705/? D/dalvikvm: GC_EXPLICIT freed 3092K, 26% free 21035K/28352K, paused 6ms+9ms, total 112ms
09-02 01:30:33.690    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 641K, 9% free 9770K/10624K, paused 2ms+2ms, total 26ms
09-02 01:30:33.980    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 1147K, 12% free 9389K/10624K, paused 3ms+2ms, total 27ms
09-02 01:30:33.980    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 10ms
09-02 01:30:34.230    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 634K, 12% free 9393K/10624K, paused 1ms+2ms, total 25ms
09-02 01:30:34.230    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 9ms
09-02 01:30:34.420    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 637K, 12% free 9398K/10624K, paused 3ms+2ms, total 26ms
09-02 01:30:34.420    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 8ms
09-02 01:30:34.620    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 597K, 12% free 9416K/10624K, paused 1ms+3ms, total 24ms
09-02 01:30:34.800    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 555K, 11% free 9510K/10624K, paused 1ms+2ms, total 24ms
09-02 01:30:34.800    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 8ms
09-02 01:30:37.270    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 492K, 9% free 9698K/10624K, paused 2ms+2ms, total 25ms
09-02 01:30:37.270    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 15ms
09-02 01:30:37.350    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 159K, 4% free 10282K/10624K, paused 1ms+2ms, total 27ms
09-02 01:30:37.350    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 14ms
09-02 01:30:37.480    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 1108K, 11% free 10104K/11280K, paused 1ms+4ms, total 39ms
09-02 01:30:37.480    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 26ms
09-02 01:30:37.580    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 1589K, 17% free 9393K/11280K, paused 3ms+2ms, total 29ms
09-02 01:30:37.580    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 10ms
09-02 01:30:37.650    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 612K, 17% free 9402K/11280K, paused 3ms+3ms, total 27ms
09-02 01:30:37.720    9079-9082/? D/dalvikvm: GC_CONCURRENT freed 613K, 17% free 9429K/11280K, paused 2ms+2ms, total 26ms
09-02 01:30:37.720    9079-9110/? D/dalvikvm: WAIT_FOR_CONCURRENT_GC blocked 9ms
09-02 01:30:37.740    9079-9107/? I/SyncService: sync service finished (01:30:37)
09-02 01:32:50.500      435-474/? W/ActivityManager: Unable to start service Intent { flg=0x4 cmp=com.google.android.apps.maps/com.google.googlenav.prefetch.android.PrefetcherService (has extras) } U=0: not found
09-02 01:32:59.940   27449-9143/? W/l: [TiclService] Skipping unknown enum class name ah
09-02 01:32:59.940   27449-9143/? W/l: [TiclService] Skipping unknown enum class name ah
09-02 01:32:59.980  27449-27453/? D/dalvikvm: GC_CONCURRENT freed 478K, 7% free 7816K/8356K, paused 8ms+1ms, total 72ms
09-02 01:33:00.610   27449-9152/? W/MsgSenderSvc: IOException sending to the data center (https://clients4.google.com//invalidation/android/request/CHES6wESzAFBUEE5MWJHWHV3N21JUVBxQ0h2bWJubERVdXd4MUtkLVNob29MbG8xNWI5Q2x1WXVfZlliNHhwaVVJZUh3Ti02LTB0UmJiY2pyeEZjV3NQSG5GbVRKUGZjMDB6NXByZkZydFVxbV93ZmNob0tVbHpsNGVhUFJXMGExcjI0MjZSZGVCam1JcHF3emduTGVaYUNhUmZnS3hlZWNTNlJLUFd1TEVPOWdkaC1BN1FNemtIZjBSUl9iUWgzX2o4dHRBTlE2LXNYRTJ2cWZ4ZzgaACoECAAQADISY29tLmFuZHJvaWQuY2hyb21l?service=chromiumsync): java.io.EOFException

奇怪的是,QR码阅读器应用程序会在退回我的应用程序之前简要显示QR码中的文本。因此代码已成功扫描。但是,当我的应用程序返回时,onActivityResult不会触发。

我猜这是一个问题(IntentIntegrator可能?)没有正确地从内存中释放。

我正在使用前置摄像头在Google Nexus 7(第一代)设备上对此进行测试。

1 个答案:

答案 0 :(得分:0)

我想我修好了。将调用方法更改为:

public void performScan(){
IntentIntegrator scanIntegrator = new IntentIntegrator(this);
                scanIntegrator.initiateScan();
}

(“thisActivity”)之前已被定义,并且必须在此过程中被释放。