question

GordonS-9701 avatar image
0 Votes"
GordonS-9701 asked GordonS-9701 answered

Xamarin Forms logout after n minutes inactivity

I have searched and found various methods, but nothing that is very clear to understand!

I need a solution that will work for both iOS and Android. I need to be able to detect n minutes of inactivity and then log the user out of the app.

It appears as though the solution will require some platform specific coding, but I'm struggling to find a solution that covers both platforms.

Can anyone help, either by pointing me at a complete example or by proving the details here?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

We can use the back-end service to keep track of the user sessions , login out when the session is expired .

Or simply set up a timer to compare the time of latest operation , and decide whether to login out based on the result .

Refer to

https://forums.xamarin.com/discussion/178100/how-can-i-detect-user-inactivity-in-xamarin-forms
https://stackoverflow.com/questions/41466761/xamarin-forms-check-if-user-inactive-after-some-time-log-out-app

1 Vote 1 ·

1 Answer

GordonS-9701 avatar image
0 Votes"
GordonS-9701 answered
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.