简体   繁体   English

Unity3D + Firebase邀请,电子邮件有效,短信失败

[英]Unity3D + Firebase Invites, email works, sms fails

I am unable to get SMS to work for Firebase invites. 我无法让SMS适用于Firebase邀请。 Currently, when I use the invite function, it opens my contact list in my phone, I can select a user email address, alter my message if I want and then send. 当前,当我使用邀请功能时,它将在我的手机中打开我的联系人列表,我可以选择一个用户电子邮件地址,然后根据需要更改我的消息,然后发送。 This works. 这可行。

If I select a phone number however, it just closes my contact list and returns to the app sending nothing. 但是,如果我选择一个电话号码 ,它只会关闭我的联系人列表,并返回到不发送任何内容的应用程序。 I'm at a loss. 我很茫然。 I get no error code and the success is returned with no id's included. 我没有收到错误代码,并且返回的成功不包含ID。

public Task<Firebase.Invites.SendInviteResult> SendInviteAsync()
{
    Firebase.Invites.Invite invite = new Firebase.Invites.Invite()
    {
        TitleText = "Test title",
        MessageText = "Simple test body",
        CallToActionText = "Why you no work?",
        DeepLinkUrl = new System.Uri("http://my.app"),
    };
    return Firebase.Invites.FirebaseInvites.SendInviteAsync(
        invite).ContinueWith<Firebase.Invites.SendInviteResult> 
        (HandleSentInvite);
}

Firebase.Invites.SendInviteResult 
HandleSentInvite(Task<Firebase.Invites.SendInviteResult> sendTask)
{
    if (sendTask.IsCanceled)
    {
        Debug.Log("Invitation canceled.");
    }
    else if (sendTask.IsFaulted)
    {
        Debug.Log("Invitation encountered an error:");
        Debug.Log(sendTask.Exception.ToString());
    }
    else if (sendTask.IsCompleted)
    {
        foreach (string id in sendTask.Result.InvitationIds)
        {
            popMNG.CreatePop("invite info: ", sendTask.Result.ToString() + " 
            and the id is:  " + id, "close", null);
        }
    }
    return sendTask.Result;
}

public void SendInvites() {
    SendInviteAsync();
}

What I've tried: 我尝试过的

  • Verified no special characters 验证没有特殊字符
  • Verified not going over character limits 验证不超过字符数限制
  • I have my SHA keys all all other features work in the app. 我有SHA键,所有其他功能都可以在该应用程序中使用。 (functions, messaging, storage, database, auth and analytics) (功能,消息传递,存储,数据库,身份验证和分析)
  • I've tried logging all output but nothing is returned. 我尝试记录所有输出,但未返回任何内容。

I've experienced the same issue (not on Unity) when there was an issue with my SIM Network (since it sends SMS from your mobile number, and emails from your email address). 当我的SIM网络出现问题时,我遇到了同样的问题(不是在Unity上)(因为它通过您的手机号码发送短信,并通过您的电子邮件地址发送电子邮件)。

Are you running this on a mobile with a valid SIM card inside? 您是否在装有有效SIM卡的手机上运行此程序? If so, it's worth checking if you experience the same issue with the quickstart sample app . 如果是这样,则值得检查一下您的quickstart示例应用程序是否遇到相同的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM