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

Meteor repeats deviceready causing IndoorAtlas crash on Android #36

Closed
wants to merge 2 commits into from

Conversation

RealHandy
Copy link

@RealHandy RealHandy commented Sep 13, 2019

Under some circumstances (maybe all circumstances?), Meteor will cause two deviceready events due to (I think) Meteor's hot code push causing a reset of cordova plugins. When this occurs, IA crashes in Android because onRequestPermissionResult sets mCbContext = null, so on Meteor's 2nd pass through the plugin init, execute() is not called, so mCbContext is null when onRequestPermissionResult tries to call mCbContext.sendPluginResult().

This fix removes the mCbContext = null to prevent this crash.

I just noticed the line number in the change below is 122, not like 97 as it should be in the 3.0 code because I made this change in the 2.x version of the plugin. This fix is to line 97 of the 3.0 code base.

@oseiskar
Copy link
Contributor

Thank you for the fix! I rebased your commit as f48340c and merged it

@oseiskar oseiskar closed this Sep 17, 2019
@RealHandy
Copy link
Author

You bet! Thanks for merging it in.

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

Successfully merging this pull request may close these issues.

2 participants