Sms​Device​Message​Store Sms​Device​Message​Store Sms​Device​Message​Store Sms​Device​Message​Store Class

Definition

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

Note

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

Note

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 : ISmsDeviceMessageStorepublic sealed class SmsDeviceMessageStore : ISmsDeviceMessageStorePublic NotInheritable Class SmsDeviceMessageStore Implements ISmsDeviceMessageStore// You can use this class in JavaScript.
Attributes
Windows 10 requirements
Device family
Windows Desktop Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.Sms.LegacySmsApiContract (introduced v1)
Capabilities
sms cellularMessaging

Properties

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.

public : unsigned short MaxMessages { get; }public uint MaxMessages { get; }Public ReadOnly Property MaxMessages As uint// You can use this property in JavaScript.
Value
unsigned short uint uint uint

An integer value representing the maximum number of messages for the device store.

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

Methods

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.

public : IAsyncAction DeleteMessageAsync(unsigned int messageId)public IAsyncAction DeleteMessageAsync(UInt32 messageId)Public Function DeleteMessageAsync(messageId As UInt32) As IAsyncAction// You can use this method in JavaScript.
Parameters
messageId
unsigned int UInt32 UInt32 UInt32

Integer ID of the message to delete, which was previously read from an SmsTextMessage object obtained from the device message store.

Returns

A new message operation object that is used to start and track the asynchronous operation.

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

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.

public : IAsyncAction DeleteMessagesAsync(SmsMessageFilter messageFilter)public IAsyncAction DeleteMessagesAsync(SmsMessageFilter messageFilter)Public Function DeleteMessagesAsync(messageFilter As SmsMessageFilter) As IAsyncAction// You can use this method in JavaScript.
Parameters
messageFilter
SmsMessageFilter SmsMessageFilter SmsMessageFilter SmsMessageFilter

A search filter that specifies which messages to delete.

Returns

A new message operation object that is used to start and track the asynchronous operation.

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

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.

public : IAsyncOperation<ISmsMessage> GetMessageAsync(unsigned int messageId)public IAsyncOperation<ISmsMessage> GetMessageAsync(UInt32 messageId)Public Function GetMessageAsync(messageId As UInt32) As IAsyncOperation( Of ISmsMessage )// You can use this method in JavaScript.
Parameters
messageId
unsigned int UInt32 UInt32 UInt32

ID of the message to retrieve.

Returns

Returns a new message operation object that is used to start and track the asynchronous operation.

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

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.

public : IAsyncOperationWithProgress<IVectorView<ISmsMessage>, int> GetMessagesAsync(SmsMessageFilter messageFilter)public IAsyncOperationWithProgress<IReadOnlyList<ISmsMessage>, int> GetMessagesAsync(SmsMessageFilter messageFilter)Public Function GetMessagesAsync(messageFilter As SmsMessageFilter) As IAsyncOperationWithProgress( Of IReadOnlyListISmsMessage, int )// You can use this method in JavaScript.
Parameters
messageFilter
SmsMessageFilter SmsMessageFilter SmsMessageFilter SmsMessageFilter

ID of the message to retrieve.

Returns
IAsyncOperationWithProgress<IVectorView<ISmsMessage>, int> IAsyncOperationWithProgress<IReadOnlyList<ISmsMessage>, int> IAsyncOperationWithProgress<IReadOnlyList<ISmsMessage>, int> IAsyncOperationWithProgress<IReadOnlyList<ISmsMessage>, int>

Returns a new message operation object that is used to start and track the asynchronous operation.

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