Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexus 6 + Android 7.1.1 back button Error #21

Open
randnetdd opened this issue Nov 17, 2017 · 0 comments
Open

Nexus 6 + Android 7.1.1 back button Error #21

randnetdd opened this issue Nov 17, 2017 · 0 comments

Comments

@randnetdd
Copy link

randnetdd commented Nov 17, 2017

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 randnetdd changed the title Nexus 6 7.1.1 Nexus 6 + 7.1.1 back button Error Nov 17, 2017
@randnetdd randnetdd changed the title Nexus 6 + 7.1.1 back button Error Nexus 6 + Android 7.1.1 back button Error Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant