我正在尝试实施 Firebase 电话验证。我在 firebase 控制台上启用了电话验证。我已生成密钥库并将 SHA 签名添加到控制台。
依赖:
dependencies {
def multidex_version = "2.0.1"
implementation platform('com.google.firebase:firebase-bom:26.0.0')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.google.firebase:firebase-analytics'
implementation "androidx.multidex:multidex:$multidex_version"
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-core'
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava'
}
Run Code Online (Sandbox Code Playgroud)
phone_verification.dart
await FirebaseAuth.instance.verifyPhoneNumber(
phoneNumber: '+1234567890',
verificationCompleted: (PhoneAuthCredential credential) {
print('verificationCompleted');
},
verificationFailed: (FirebaseAuthException e) {
print('verificationFailed');
if (e.code == 'invalid-phone-number') {
print('The provided phone number is not valid.');
}
else {
print('Some error occoured: $e');
}
},
codeSent: (String verificationId, int resendToken) async {
print('codeSent');
// Update the UI …Run Code Online (Sandbox Code Playgroud) P vs NP问题确实存在问题吗?难道我们不能说P问题是经典计算机可以解决的问题,因为它适合于它的架构,NP问题本质上是量子的,可以通过量子架构的计算机来解决吗?
algorithm computer-science cpu-architecture quantum-computing