0

I would like to call the default sms and email editor from my unity 3d mobile application. More specifically I want to give to my users the possibility to share their referral code calling and precompiling an email or an sms.

The game is for Android and IOS both.

Please ask for more details

Thanks in advance

user1759646
  • 47
  • 1
  • 6

1 Answers1

0

Try:

void SMS(long number, string message) {
    string separator=(Application.platform == RuntimePlatform.IPhonePlayer)?";":"?";
    Application.openURL(string.Format("sms:{0}{1}body={2}", number, separator, WWW.EscapeURL(message)));
}

Based on https://stackoverflow.com/a/19126326/785171

Community
  • 1
  • 1
Krzysztof Bociurko
  • 4,575
  • 2
  • 26
  • 44