this will only work because the callback is being returned on a the UI thread by the lib. We should create a method that calls runOnUiThread and dismisses the dialog.