Ionic local notification trigger call back is not working when app is in background for a while


#1

I use local notification heavily in my app. I get local notifications but I needed something else to happen after notification is triggered. So I used

this.localnotification.on('trigger', (notification) => {
 //Do something here
});

in constructor of one of my provider.
This doesn’t work only when app is not opened for a while. if I opened my app at least 4 hours before some local notification is about to trigger then above trigger will happen. I’m assuming issue is app goes into sleep mode if it’s not been opened for a while. Has anyone experienced similar kind of issue and know the solution for it.

Please respond, I’m just this issue away from launching my app.


#2

Hmmm. no response, Got fed up with very less ionic support and cordova plugins inflexibility. Looking into other alternatives for hybrid mobile development. Good bye…


#3

You can use this plugin, you can avoid the app sleeping in background


#4

Thank you,
but I already tried this plugin, it didn’t work.


#5

You probably didn’t get a response because no one knows the answer. The alternative would be hundreds of “I don’t know” responses.


#6

Have you found out the solution for this? @vpotluri