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

Android: When using double webviews push notifications, notification callback will not be invoked #29

Open
eladmoshe opened this issue May 4, 2015 · 0 comments

Comments

@eladmoshe
Copy link

Consider the following scenario:

  1. The app has two webviews: A and B.
  2. Push plugin is loaded in both webviews.
  3. Webview A calls the PushPlugin.register() function to receive notifications.
  4. Webview B is opened, pausing webview A.
  5. Webview A is closed, and the app returns to webview B.
  6. Push notification is received. From this stage the callback will no longer fire.

The root cause is that the plugin uses static variables and functions (especially gECB) therefore when webview B is closed it calls to onDestroy(), which nullify gECB which stores webview A's callback reference.

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