简体   繁体   中英

ChatMessageManager in Windows Phone 10

I'm building an app that composes a SMS and then it uses ChatMessageManager to show the send new sms dialog. This works just fine in Windows Phone 8.1 but it will not show the SMS dialog in Windows Phone 10.

Anyone who knows if there is a big difference in 8.1 and 10 with that SMS dialog? Anyone who knows hot to work around it?

Using a code more or less the same as this: https://stackoverflow.com/a/24900268/1787551

    public async static Task SendMessage (string phoneNumber)
    {
        ChatMessage msg = new ChatMessage();
        msg.MessageKind = Windows.ApplicationModel.Chat.ChatMessageKind.Standard;
        msg.Recipients.Add(phoneNumber);
        await ChatMessageManager.ShowComposeSmsMessageAsync(msg);
    }

I'm calling the SendMessage method with await, of course. This works for me on Windows 10 Mobile.

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