# Auto-reload when application is background mode

**URL:** <https://forum.ionicframework.com/t/auto-reload-when-application-is-background-mode/78893>\
**Category:** ionic-v1\
**Created:** [February 8, 2017, 5:02pm UTC](https://forum.ionicframework.com/t/auto-reload-when-application-is-background-mode/78893 "2017-02-08T17:02:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![FelixWattez](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@FelixWattez](https://forum.ionicframework.com/u/FelixWattez)\
**Post date:** [February 8, 2017, 5:02pm UTC](https://forum.ionicframework.com/t/auto-reload-when-application-is-background-mode/78893/1 "2017-02-08T17:02:19Z")

</div>

Hi everyone !

I have a question about the background mode in Android & iOS.

When my app is in background, I want it to reload (like if I kill him) if it’s in background mode since more than 30 minutes.

I saw applications like Facebook, Twitter that show splashscreen when there are not displaying since a few time.

Do you know how to manage it on Ionic ? I don’t see function with $ionicPlatform.

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![thesourav](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@thesourav](https://forum.ionicframework.com/u/thesourav)\
**Post date:** [February 8, 2017, 6:54pm UTC](https://forum.ionicframework.com/t/auto-reload-when-application-is-background-mode/78893/2 "2017-02-08T18:54:43Z")

</div>

You can use onresume function of IonicPlatform.

```
app.run(function($ionicPlatform) {
    $ionicPlatform.on('resume', function() {
    $rootScope.$broadcast('onResume');
    //Refresh Scope and Views
});

$ionicPlatform.on('pause', function() {
$rootScope.$broadcast('onPause');
  });
  })
```

---

<div class="post-metadata">

**Author:** ![FelixWattez](https://avatars.discourse-cdn.com/v4/letter/f/5daacb/32.png) [@FelixWattez](https://forum.ionicframework.com/u/FelixWattez)\
**Post date:** [February 9, 2017, 3:37pm UTC](https://forum.ionicframework.com/t/auto-reload-when-application-is-background-mode/78893/3 "2017-02-09T15:37:35Z")

</div>

It works !

Thank you
