The successCallback is called in the engine thread. You have to switch to the main thread for any UI specific operations like removing the scanner from the view hierarchy etc. The easiest way of doing this is by using setTimeout:
// Code that manipulates the UI.
Was this article helpful?