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

Plugin can erroneously report disabled when it's actually enabled (Android) #422

Open
TheBosZ opened this issue Feb 8, 2019 · 0 comments

Comments

@TheBosZ
Copy link

TheBosZ commented Feb 8, 2019

On Android, it's possible to get into a situation where the Android code is turned on but the Javascript side doesn't think it is.

The easiest way to reproduce this is to start up a debuggable app and connect to it with Chrome tools.

To reproduce:

  1. Enable the plugin with .enable()
  2. Reload the page with location.reload()
  3. Check if plugin is enabled with .isEnabled()
  4. Should return false
  5. Go to home screen
  6. App notification should appear saying it's running in the background

My workaround:
When I disable the plugin, I:

  1. Set an event listener for enabled. The listener's only job is to disable the plugin and then remove the event listener
  2. Call .enable()

That way it will actually disable the plugin.

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