I've tried searching for a solution with no luck yet. I am trying to use the google app invite to invite friends to use my app (android). Emails are sent but sms are not. I do not get any error message, in fact I actually get a message that the invitation has been sent. I also tried adding sms permission to my app.. Any thoughts?
Asked
Active
Viewed 1,030 times
3
-
Hey did u solve the issue. I am searching for the code to send invite via sms. If u have could please able to share the code? – Divya Oct 20 '15 at 02:30
-
Yes, I had a weird character in the message itself (was invisible to the eye) because I copied the text to be sent in the sms itself. The code itself is the same as for the email: – shir Oct 21 '15 at 08:54
-
private void onInviteClicked() { Intent intent = new AppInviteInvitation.IntentBuilder(getString(R.string.invite_friends)) .setMessage(getString(R.string.invite_message)) .setDeepLink(Uri.parse(getString(R.string.invite_url))) .build(); startActivityForResult(intent, REQUEST_INVITE); } @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); finish(); } – shir Oct 21 '15 at 08:56
-
http://stackoverflow.com/questions/34940408/android-google-app-invite-sample-is-not-sending-email-and-message-what-i-am-doin Please help I am facing this issue – g4gaj Jan 22 '16 at 07:07
2 Answers
4
Same problem here. To solve it reduce the length of your message.
As we know, the message must be not longer than 100 symbols. But this is true only for latin characters. If your message contains at least one non-latin symbol (it switches to UCS-2 encoding), then the maximum length becomes only 39 symbols long (have tested Russian only).
So if you're trying to submit 40+ symbols, the message won't be sent.

Oleg Cherr
- 3,565
- 2
- 17
- 27
-
-
As workaround for localized version I pass short message to `setMessage()` and full description to `setEmailHtml()` – tse Jun 22 '16 at 10:55
3
I had the same problem. Emails were sent, but SMS messages not (although the app showed a snackbar saying that the invitation was sent). Apparently SMS messages are not sent when the message text contains some "more special" characters. In my case the text contained a "ë". After removing this character, SMS messages were successfully sent.

thvranken
- 113
- 1
- 8
-
yes, that indeed was my problem as well :) I wish you had responded back then, would have saved me a lot of time :) Thanks for sharing! – shir Oct 10 '16 at 13:52