티스토리 뷰
Xamarin
Xamarin.Forms Android PhoneAuthProvider.Instance.VerifyPhoneNumber deprecated Resolve
NicSub 2021. 4. 8. 10:30728x90
반응형
Xamarin.Forms Android PhoneAuthProvider.Instance.VerifyPhoneNumber deprecated
변경전
PhoneAuthProvider.Instance.VerifyPhoneNumber(
phoneNumber,
OTP_TIMEOUT, // const int 30
TimeUnit.Seconds,
Platform.CurrentActivity,
onVerificaton);
변경후
FirebaseAuth auth = FirebaseAuth.Instance;
PhoneAuthOptions options =
PhoneAuthOptions.NewBuilder(auth)
.SetPhoneNumber(phoneNumber) // Phone number to verify
.SetTimeout((Java.Lang.Long)30L, TimeUnit.Seconds) // Timeout and unit
.SetActivity(Platform.CurrentActivity) // Activity (for callback binding)
.SetCallbacks(this) // OnVerificationStateChangedCallbacks
.Build();
PhoneAuthProvider.VerifyPhoneNumber(options);
--> OnCodeSent 자동 실행.
public override void OnCodeSent(string verificationId, PhoneAuthProvider.ForceResendingToken forceResendingToken)
{
base.OnCodeSent(verificationId, forceResendingToken);
_verificationId = verificationId;
this._forceResendingToken = forceResendingToken;
_phoneAuthTcs?.TrySetResult(true);
Console.WriteLine("#######:"+forceResendingToken.ToString());
Console.WriteLine("#############:"+_phoneAuthTcs.ToString());
System.Diagnostics.Debug.WriteLine("################# PhoneAuthCredential created Automatically" + _verificationId.ToString());
}
반응형
'Xamarin' 카테고리의 다른 글
댓글
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- GetCellContent CheckBox Value
- SkiaSharp
- WPF Datagrid Cell Value Change
- c# Encrypt / Decrypt
- C# LINQ Left join
- Xamarin SMS OTP Send
- WPF Excel Export Microsoft.Office.Interop 성능향상(열 기준으로 복사)
- Xamarin Firebase Phone User Add
- Entry '' has empty native path
- Xamarin Firebase Phone Auth
- Label Text LineBreak in Xaml
- 서버 수준의 URN 필터
- WPF Scrollviewer in ScrollViwer
- Xamarin.Ios Firebase Phone User Add
- 암호 마스터키
- FileStream Add Byte
- Microcharts
- ssl_client_socket_impl.cc
- WPF Textbox
- Windows IIS FTP 디렉토리 목록 오류
- 연산자 뒤에 피연산자가 없습니다.
- Linux SSH Multi Computer Join
- ClickOnce 인증서 인증기간 변경
- Xamarin.Ios Firebase Phone SMS OTP Send
- Xamarin.Ios Firebase Phone Auth
- Xamarin.Forms
- Embeded 한글Font적용
- Xamarin reCAPTCHA
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
글 보관함