简体   繁体   中英

Call external application from Unity mobile application

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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