Saturday, May 23, 2020

Count Down Timer for re-sending OTP in Xamarin.Forms

This blog demonstrates how to create a count down timer in Xamarin.Forms.

In one of my application I required this feature, so I thought of sharing that solution with others. My requirement was to validate the OTP and to avail the resend button after some time period, as you can see in the other applications. So with the help of Device.StartTimer and along with some logic I have created this sample application.

Here I have taken the countdown time for 10 secs, and when the time reaches to 0 sec, the resend button will enable. I have shared the code in github and here is the simple demonstration of the app.
Github source code link : https://github.com/GovardhanNag/CountDownTimer-Xamarin.Forms

No comments:

Post a Comment

SSO login using Launcher in .NET MAUI

  Some of the scenarios require to open the external/system browser to perform oAuth 2.0 login and then receive the auth code via redirect U...