none
How do I compose sms through vb in Windows Phone.

    Question

  • I am developing an app in VB for personal use and for that I need to compose an SMS through the same App . Could any one give me the code for this. . I couldn't able to find any solution on internet for VB code. Every blogs has C# code.

    I am very beginner in this.


    Also please check out this http://1drv.ms/1E99miA Vishwa Raj ( Computer Hobbyist) Content Creator at Microsoft Community Center Web Developer at Sanity Softwares Pvt. Ltd Beginners in Windows Phone App Development.

    Sunday, April 5, 2015 4:48 AM

Answers

  • Hi qwertyasvishwa,

    Which version of app you are developing?

    For Windows Phone 8 / 8.1 Silverlight app, we need to use SmsComposeTask Class: https://msdn.microsoft.com/library/windows/apps/microsoft.phone.tasks.smscomposetask%28v=vs.105%29.aspx

    Windows Phone 8 / 8.1 Silverlight implementation:

    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
            Dim composer As New SmsComposeTask
            composer.To = "mobile-telephone-number"
            composer.Body = "This is a text message from an app!"
            composer.Show()
        End Sub

    For Windows Phone 8.1 RT app, we need to use ChatMessage class: https://msdn.microsoft.com/en-us/library/windows.applicationmodel.chat.chatmessage.aspx

    Windows Phone 8.1 RT implementation:

    Private Async Sub Button_Click(sender As Object, e As RoutedEventArgs)
            Dim message As New ChatMessage
            message.Recipients.Add("mobile-telephone-number")
            message.Body = "This is a text message from an app!"
            Await ChatMessageManager.ShowComposeSmsMessageAsync(message)
        End Sub


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 6, 2015 8:31 AM
    Moderator

All replies

  • Hi qwertyasvishwa,

    Which version of app you are developing?

    For Windows Phone 8 / 8.1 Silverlight app, we need to use SmsComposeTask Class: https://msdn.microsoft.com/library/windows/apps/microsoft.phone.tasks.smscomposetask%28v=vs.105%29.aspx

    Windows Phone 8 / 8.1 Silverlight implementation:

    Private Sub Button_Click(sender As Object, e As RoutedEventArgs)
            Dim composer As New SmsComposeTask
            composer.To = "mobile-telephone-number"
            composer.Body = "This is a text message from an app!"
            composer.Show()
        End Sub

    For Windows Phone 8.1 RT app, we need to use ChatMessage class: https://msdn.microsoft.com/en-us/library/windows.applicationmodel.chat.chatmessage.aspx

    Windows Phone 8.1 RT implementation:

    Private Async Sub Button_Click(sender As Object, e As RoutedEventArgs)
            Dim message As New ChatMessage
            message.Recipients.Add("mobile-telephone-number")
            message.Body = "This is a text message from an app!"
            Await ChatMessageManager.ShowComposeSmsMessageAsync(message)
        End Sub


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, April 6, 2015 8:31 AM
    Moderator
  • Thanx Chen for your Reply....I got the solutions by visiting different blogs mean time.Actually I was doing one mistake, ie I was trying to use the SmsComposeTask Class in Windows Phone Runtime. Now I migrate my App to the Windows Phone Silverlight. But through your reply I also come to know about Windows Phone Runtime, that wahat can I use to it.

    Now my next step is to learn the difference between the Windows Phone Runtime and Windows Phone Silverlight.

    Anyway thanx a lot to you. I always get to learn some new things from this forums.


    Also please check out this http://1drv.ms/1E99miA Vishwa Raj ( Computer Hobbyist) Content Creator at Microsoft Community Center Web Developer at Sanity Softwares Pvt. Ltd Beginners in Windows Phone App Development.

    Monday, April 6, 2015 7:07 PM
  • Thanx Chen for your Reply....I got the solutions by visiting different blogs mean time.Actually I was doing one mistake, ie I was trying to use the SmsComposeTask Class in Windows Phone Runtime. Now I migrate my App to the Windows Phone Silverlight. But through your reply I also come to know about Windows Phone Runtime, that wahat can I use to it.

    Now my next step is to learn the difference between the Windows Phone Runtime and Windows Phone Silverlight.

    Anyway thanx a lot to you. I always get to learn some new things from this forums.


    Also please check out this http://1drv.ms/1E99miA Vishwa Raj ( Computer Hobbyist) Content Creator at Microsoft Community Center Web Developer at Sanity Softwares Pvt. Ltd Beginners in Windows Phone App Development.


    You're welcome:)

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, April 7, 2015 1:43 AM
    Moderator