SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore Class


Provides access to the messages stored on an SMS Device and information about the message store.


This functionality is only available to mobile operator apps and UWP apps given privileged access by mobile network operators, mobile broadband adapter IHV, or OEM. For more information, see Mobile Broadband: device apps.


Note that this class and its methods are supported for the maintenance of legacy desktop apps that used it in earlier versions of Windows; and if you do use this class, you must specify the Windows.Devices.Sms.LegacySmsApiContract in your app's manifest. Do not use this class if you are developing new apps for Windows 10. Instead, use the members of this namespace that do not require the Windows.Devices.Sms.LegacySmsApiContract.

public : sealed class SmsDeviceMessageStore
struct winrt::Windows::Devices::Sms::SmsDeviceMessageStore
public sealed class SmsDeviceMessageStore
Public NotInheritable Class SmsDeviceMessageStore
// This class does not provide a public constructor.

Windows 10 requirements

Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
sms cellularMessaging


MaxMessages MaxMessages MaxMessages MaxMessages MaxMessages

Indicates the maximum number of messages that can be stored in the device store. The client can use this value to determine how to maintain enough space in the device store to receive new messages from the network.


DeleteMessageAsync(UInt32) DeleteMessageAsync(UInt32) DeleteMessageAsync(UInt32) DeleteMessageAsync(UInt32) DeleteMessageAsync(UInt32)

Deletes the message with the specified ID. Because the device might be busy, the operation executes asynchronously. The asynchronous operation object returns immediately.

DeleteMessagesAsync(SmsMessageFilter) DeleteMessagesAsync(SmsMessageFilter) DeleteMessagesAsync(SmsMessageFilter) DeleteMessagesAsync(SmsMessageFilter) DeleteMessagesAsync(SmsMessageFilter)

Deletes the messages to which the filter applies. The filter can be used to delete all messages, or only messages that are read, unread, sent, or in a draft state. Because the operation might not be instantaneous, it executes asynchronously. The asynchronous operation object returns immediately.

GetMessageAsync(UInt32) GetMessageAsync(UInt32) GetMessageAsync(UInt32) GetMessageAsync(UInt32) GetMessageAsync(UInt32)

Retrieves the message with the specified ID. The device might be busy, so the method executes asynchronously. The asynchronous operation object returns immediately.

GetMessagesAsync(SmsMessageFilter) GetMessagesAsync(SmsMessageFilter) GetMessagesAsync(SmsMessageFilter) GetMessagesAsync(SmsMessageFilter) GetMessagesAsync(SmsMessageFilter)

Retrieves a list of messages that match the conditions specified in a filter. The messages can be filtered as read, unread, sent, or in the draft state.