Ionic 2 rc4
My app receives push notifications, the notification itself always arrives fine
The problem is that reading native storage inside the push.on(‘notification’…) runs very slow when the app is in the background, or sometimes it never revolves the storage.get promise. push.on gets triggered, but when it gets to storage.get(‘data’).then =>((data) … it takes 30 seconds or more (or never) to return data from the local storage when the app is in the background. When the app is in the foreground, it is instant.
There is no difference in the app for push notifications between foreground and background, but the difference in speed is huge when trying to read the local storage.
It does not matter if the screen is on or off, so it’s not a matter of the phone being asleep.
Is there something about the app being in the background that would make reading local storage (or promises) act differently?