Shruti Singhal
Shruti Singhal

Reputation: 35

Detect App inactivity/idle timeout in NativeScript

I need to detect user's inactivity time in NativeScript app. I tried with few plugins (like ng-idle) but they are not compatible with NativeScript. I also tried to to emit application level event (in page router outlet) but it is not working either. Any help will be appreciated.

Upvotes: 2

Views: 1567

Answers (1)

Nick Iliev
Nick Iliev

Reputation: 9670

In the mobile context, you would like to track the inactivity in the native mobile application lifecycle. For Android, you can extend the Application and implement some of the solutions shown here. Following this approach, you can do the same on iOS (overwrite the AppDelegate as shown here and implement some of the native solutions)

Upvotes: 2

Related Questions