小编Mut*_*u S的帖子

Firebase 电话身份验证不会仅在发布模式下启动 OTP,但即使在为发布模式添加 sha1 后仍可在调试模式下工作

步骤我是如何实施的。

按照建议,我一直实施。在调试模式下它非常好。不幸的是,即使我在 firebase 控制台中添加了调试和释放 sha1 密钥,它也无法在发布模式下工作。

步骤 1. 编码部分在这里

final PhoneVerificationCompleted verificationCompleted =
    (PhoneAuthCredential user) {
  successMessage('Your phone number verified successfully!');
  _loginNotifier.validate();
};

 final PhoneVerificationFailed verificationFailed = (FirebaseAuthException authException) {
  errorMessage('Phone number verification failed. Code: ${authException.code}. Message: ${authException.message}');
  print(
      'Phone number verification failed. Code: ${authException.code}. Message: ${authException.message}');
};

 final PhoneCodeAutoRetrievalTimeout codeAutoRetrievalTimeout =
    (String verificationId) {
  this._verificationId = verificationId;
  print("time out");
};

 firebaseAuth = FirebaseAuth.instance;
firebaseAuth.verifyPhoneNumber(
    phoneNumber: '+$_phoneWithCC',
    timeout: const Duration(seconds: 60),
    verificationCompleted: verificationCompleted,
    verificationFailed: verificationFailed,
    codeSent: codeSent,
    codeAutoRetrievalTimeout: codeAutoRetrievalTimeout);
Run Code Online (Sandbox Code Playgroud)

第2步: …

android sha1 firebase flutter

6
推荐指数
1
解决办法
753
查看次数

从对象数组中删除重复项

我有一个像下面这样的对象,

class LocationData{
 String time;
 String name;
 String address;
}
Run Code Online (Sandbox Code Playgroud)

对于这个对象,我创建了 getter setter。

通过使用服务,我填写了上述模型并保存到房间数据库中。每当用户打开我的应用程序时,我只是使用 API 将房间数据库数据更新到服务器。现在有时会发生时间重复。如何根据时间从数组中删除对象。时间应该是唯一的。

android duplicates kotlin android-room

-1
推荐指数
1
解决办法
1109
查看次数

标签 统计

android ×2

android-room ×1

duplicates ×1

firebase ×1

flutter ×1

kotlin ×1

sha1 ×1