Forum Libraries, Components, and Plugins

Scandit SDK - result view after successful scan

I've got the scandit component all setup and successfully hitting my callback method with the barcode value.
Problem is, unlike the zxing sdk it remains in the camera view. How do I get back to my content view which is where I display results of the scan in a webview?

Can't I just


This results in the layout loading, but the webview doesn't load. I know because I have a progress bar that goes along with loading the webview and it's not appearing at all.


  • ZacharyGramanaZacharyGramana USMember Xamurai
    edited October 2013

    Did you call picker.StopScanning() in your call back, and before SetContent?

  • Generally what you do is you either create a new Activity with the scanner in it and once it is done you call stopScanning() as pointed out by Zack and then finish() the Activity to return back to your previous Activity where you would load the URL. Alternatively you open a new Activity after the callback from the scanner. You can also have the scanner in a tab or subview but calling SetContentView afterwards with your main layout (I am assuming because before the scanner was the content view?) is not something that is generally done under Android.

    I don't know how the ZXing component works but I assume it creates the Activity for you, opens it and then closes it when the scan was successful. Since you can add the Scandit scanner also as a subview etc. you will have to create the Activity yourself (the sample project shows how to do it).

    If this has not helped then please post a code snippet of how you initialize and display the scanner and what you do after receiving the callback. This way it will be much easier to understand what might go wrong.

Sign In or Register to comment.