2

I created an android & iOS application with cordova and ionic. I added a listener to the pause event and it fires when another application interrupts mine, for example when I receive a call via skype or when I tap the home button on a iOS device.

The problem is that on my iphone, if I receive a phone call the pause event doesn't fire! It's driving me crazy! why a phone call is different from interruptions by other apps?

In android it works correctly.

Any idea?

Sergio Morstabilini
  • 2,035
  • 21
  • 28
  • Hmm would expect that the "pause" event is fired also. Maybe this event is fired? https://cordova.apache.org/docs/en/5.1.1/cordova_events_events.md.html#startcallbutton – Mark Veenstra Jun 16 '15 at 07:42
  • 1
    @Mark: I think it refers to the physical button on blackberry devices. but thanks for the suggestion. – Sergio Morstabilini Jun 16 '15 at 08:13

1 Answers1

0

Hooray!!

this is the solution: https://issues.apache.org/jira/browse/CB-115?jql=project%20%3D%20CB%20AND%20text%20~%20pause

For ios only there are also the 'resign' and 'active' events. Be careful that some actions fire the 'pause' AND the 'resign' events.

The resign and active events are actually documented in the cordova docs but I didn't notice it.

Sergio Morstabilini
  • 2,035
  • 21
  • 28