I have xamarin form application, i want to add one feature that when user not touch the screen for 30 sec then page navigate to Passcode page. How can i done this, i'm new in xamarin form please help me.
No, I am focused on Android, sorry. Google say:
For iOS, the approach discussed in this stack overflow thread has what looks like an elegant solution from @WolfgangSchreurs (assuming it's the same Wolfgang as on this forum!) . This creates an AllGesturesRecognizer in the AppDelegate.
I haven't tried the code or checked whether it's still a valid solution - but worth investigating.
Take a look at the Xamarin Device Start timer function
// Start a new timer (Modify timespan to change how often this calls, currently one second)
Device.StartTimer(new TimeSpan(0, 0, 1), () =>
// Check here for your interaction/logout
// Return false to cancel the timer, true to continue the timer and call this function again at the next interval
How i achieve through device.start timer???
How app know that user not touch the screen?
You know the user has tapped the screen in your app in the command handlers for your buttons/gesture recognisers.
Therefore in all these handlers you'll need to have a common method you call to record the fact that the user has interacted.
Nice. I think I once knew that but had forgotten.
Do you know of iOS or UWP equivalents? That could be very useful.
@AlessandroCaliaro You are Legend
Xamarin Inc., as a wholly-owned Microsoft subsidiary acting as a separate legal entity, adheres to the Microsoft Privacy Statement: Privacy & cookies