问题描述
我试图发送邀请与Firebase邀请。从联系人中选择一封电子邮件时,Firebase表示已发送邀请,但永远不会收到该电子邮件。在控制台上,SHA1证书可以配置。
返回的错误代码始终为RESULT_OK,从AppInviteInvitation.getInvitationIds返回的邀请数是正确的。
SDK已更新在Gradle上使用最新版本10.0.1,就像在文档中解释的那样。
$ b
创建邀请的代码是:
Intent intent = new AppInviteInvitation.IntentBuilder(title)
.setMessage(msg)
.setCallToActionText(callToActionText)
.setOtherPlatformsTargetApplication(AppInviteInfitation .IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS,IOS_CLIENT_ID)
.build();
有什么想法?
这是值得指定的是,在我的情况下,电子邮件是完美的发送,当我删除方法调用:
.setOtherPlatformsTargetApplication(...)
执行以下步骤:
$ b $ ol
SHA-256散列(来自debug和release keystore )是为Firebase Android项目设置添加的:
keytool -exportcert -keystore path-to-debug-or-production-keystore - list -v
已更新 google-services.json
是从Firebase Android项目设置下载的,并添加到应用程序根目录(机智h Xamarin的GoogleServicesJson构建操作)。所以文件包含以下内容:
...
appinvite_service:{
状态:2,
other_platform_oauth_client:[
{
client_id:1234567890-specified_ios_client_id.apps.googleusercontent.com,
client_type:2,
ios_info:{
bundle_id:ios.app.bundle.id,
app_store_id:9876543210
}
},
$ $ $ $ $ $ $ ol>
指定的 client_id
在 .setOtherPlatformsTargetApplication(...)
方法调用,并在 google-services.json
此前,Firebase邀请已针对iOS项目,但我不明白它是否可以帮助Android的任何方式。
I've trying to send invitations with Firebase Invites. When select an email from a contact, Firebase says that has sent the invitation, but the email is never received.
On the console the SHA1 certicates are configurated.
The errorcode returned is always RESULT_OK and the number of invitations returned from AppInviteInvitation.getInvitationIds is correct.
The SDK is updated on gradle with the latest version, 10.0.1, like explained on the documentation.
The code that creates the invitation is:
Intent intent = new AppInviteInvitation.IntentBuilder(title)
.setMessage(msg)
.setCallToActionText(callToActionText)
.setOtherPlatformsTargetApplication(AppInviteInvitation.IntentBuilder.PlatformMode.PROJECT_PLATFORM_IOS, IOS_CLIENT_ID)
.build();
Any ideas?
解决方案 I had the same problem and I managed to fix it, although I am not pretty sure what step actually helped.
It's worth specifying that in my case the email was perfectly sent when I removed the method call:
.setOtherPlatformsTargetApplication(...)
The following steps were applied:
- All fields were filled on Firebase console for Android and iOS project settings (including App ID Prefix and App Store ID).
SHA-256 hashes (from debug and release keystore) were added for Firebase Android project settings:
keytool -exportcert -keystore path-to-debug-or-production-keystore -list -v
Updated google-services.json
was downloaded from Firebase Android project settings and added to the application root (with GoogleServicesJson Build Action for Xamarin). So the file among others contains the following:
...
"appinvite_service": {
"status": 2,
"other_platform_oauth_client": [
{
"client_id": "1234567890-specified_ios_client_id.apps.googleusercontent.com",
"client_type": 2,
"ios_info": {
"bundle_id": "ios.app.bundle.id",
"app_store_id": "9876543210"
}
},
...
]
}
...
The specified client_id
is the same in .setOtherPlatformsTargetApplication(...)
method call and in google-services.json
Also Firebase Invites had been previously adjusted for the iOS project, but I don't see if it could help for the Android anyhow.
这篇关于Firebase邀请说已发送邀请,但尚未收到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!