Ionic Cordova Pause Event Not Triggered

Below is my source code that I am using in my app.component.ts file in the constructor.

 platform.ready().then(() => {
      console.log('Platform is ready. ');

      platform.pause.subscribe((result)=>{
        console.log("Platform Pause Event. ");
      });
      
      platform.resume.subscribe((result)=>{
         console.log("Platform Resume Event.");
      });

      });

Althought , Pause and Resume event triggered together when resume should call only.
onPause state - nothing output .
onResume state - Platform Pause Event . Platform Resume Event.

Checked with the real device and Chrome remote device.

1 Like

Found my error, I have change KeepRunning value to true in config.xml and everything is working fine .

<preference name="KeepRunning" value="true" />

1 Like