cordova-plugin-app-launcher icon indicating copy to clipboard operation
cordova-plugin-app-launcher copied to clipboard

Nexus 6 + Android 7.1.1 back button Error

Open randnetdd opened this issue 6 years ago • 0 comments

Pressing the back button on Nexus 6 + Android 7.1.1 will generate an error

E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.success(org.json.JSONObject)' on a null object reference E AndroidRuntime: at com.hutchind.cordova.plugins.launcher.Launcher.onActivityResult(Launcher.java:475) E AndroidRuntime: at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:152) E AndroidRuntime: at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:358) E AndroidRuntime: at android.app.Activity.dispatchActivityResult(Activity.java:6932) E AndroidRuntime: at android.app.ActivityThread.deliverResults(ActivityThread.java:4085) E AndroidRuntime: ... 11 more

In Nexus 6, launching the application in launcher.launch starts with a single task Pressing the back button in this state will generate onActivityResult Application is crashing with callback.success because callback is NULL

public void onActivityResult(int requestCode, int resultCode, Intent intent) {
	super.onActivityResult(requestCode, resultCode, intent);
	if (callback == null) {
		return;
	}

randnetdd avatar Nov 17 '17 01:11 randnetdd