Adjusted the plugin so it triggers the success/error callbacks on Android when using headless mode.