1

I am unable to get SMS to work for Firebase invites. 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.

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. (functions, messaging, storage, database, auth and analytics)
  • I've tried logging all output but nothing is returned.
DKinnison
  • 355
  • 1
  • 3
  • 16

1 Answers1

0

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).

Are you running this on a mobile with a valid SIM card inside? If so, it's worth checking if you experience the same issue with the quickstart sample app.

Jake Lee
  • 7,549
  • 8
  • 45
  • 86
  • 1
    I do have a valid sim and have tried on multiple devices. All of which exhibit the same behavior. I am going to do a fresh install and try the sample quick start and get back to this question. Thank you so much for your help. – DKinnison Nov 27 '18 at 15:46
  • @DKinnison Out of curiosity, have any luck fixing it? – Jake Lee Jan 29 '19 at 17:01
  • No not as of yet. I've released the game as I had to for monetary reasons but the bug is still present. Although, it only happens on Android. The messaging system works on iOS just fine. I'm posting a new update to both Android Play Store and the App Store today. It's free and if you have an Android, you can see exactly what I mean. (Not a sales pitch I promise) Game is called "Lexicube" – DKinnison Jan 30 '19 at 13:57