How to automatically resume ionic 2 app after a certain time?


#1

Hi guys! I need a way to automatically fire resume event after a certain period of time (5 minutes) when app is in pause


#2

You want to get the app into foreground when the user chose to put it in background explicitly?


#3

Thank you for reply , what I need is when no users interactions and after the app paused , to resume this app. Thanks


#4

The user should be in charge of whether and when your app is running. If I pause it, that means I do not want it eating my battery or waking up and interrupting whatever I am doing at the moment.


#5

No, the idea behind this app is that, actually we need to install this app on 20 smartphones in our showroom. we dont want to lock completely the device, so that customers can test devices, test the app and others app installed , and when there is no users interactions the default app(this one) will resume. I need the mechanism to resume the app and bring it to foreground.
Thx


#6

You could look into the local notifications plugin, but you probably want to stick to ad-hoc distribution, because I wouldn’t be surprised if app stores would reject this.


#7

Thanx,
Have any ideo how I can manage this with local notification? I have also checked ng2-idle but I dont know how I can fire to resume app.


#8

I don’t think this is possible at all. There is no way to get an app active without user interaction - the OS calling app is an exception.


#9

If you want this then take a look at the following for a start:


#10

We have an ionic-native wrapper for this plugin: https://ionicframework.com/docs/native/insomnia/


#11

Thanks, that’s good to know!


#12

There is a way we can simulate a trigger then pass this event on Resume ?