How to call REST service on SMS receival when app is closed?

Hello everyone,

I’m new to Ionic and I’m building a tool that needs to make a HTTP request to a REST service, even if app is closed / not running, when a SMS is delivered to the phone?

I’ve searched the web and have found some tutorials related to “broadcast receiver”, but the explanations are poor.

How to achieve that? I’m using ionic 3, angular 5, cordova 8 and a android device.

Thanks in advance.

hi are you find any solution about this
because i need this

i don’t think it possible with a Cordova based App. You cannot run your js code when the App isn’t running. I didn’t even know if it possible native, if yes you have to build your own plugin which does your thing