SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore SmsDeviceMessageStore Class

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.

Syntax

Declaration

public sealed class SmsDeviceMessageStorepublic sealed class SmsDeviceMessageStorePublic NotInheritable Class SmsDeviceMessageStore

Properties summary

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.

Methods summary

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

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.

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

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.

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 uint MaxMessages { get; }public uint MaxMessages { get; }Public ReadOnly Property MaxMessages As uint

    Property Value

    • uint
      uint
      uint
      uint

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

Methods

  • DeleteMessageAsync(System.UInt32)
    DeleteMessageAsync(System.UInt32)
    DeleteMessageAsync(System.UInt32)
    DeleteMessageAsync(System.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(System.UInt32)public IAsyncAction DeleteMessageAsync(System.UInt32)Public Function DeleteMessageAsync(System.UInt32) As IAsyncAction

    Parameters

    • messageId
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

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

    Returns

  • DeleteMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    DeleteMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    DeleteMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    DeleteMessagesAsync(Windows.Devices.Sms.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(Windows.Devices.Sms.SmsMessageFilter)public IAsyncAction DeleteMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)Public Function DeleteMessagesAsync(Windows.Devices.Sms.SmsMessageFilter) As IAsyncAction

    Parameters

    Returns

  • GetMessageAsync(System.UInt32)
    GetMessageAsync(System.UInt32)
    GetMessageAsync(System.UInt32)
    GetMessageAsync(System.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(System.UInt32)public IAsyncOperation<ISmsMessage> GetMessageAsync(System.UInt32)Public Function GetMessageAsync(System.UInt32) As IAsyncOperation( Of ISmsMessage )

    Parameters

    • messageId
      System.UInt32
      System.UInt32
      System.UInt32
      System.UInt32

      ID of the message to retrieve.

    Returns

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

  • GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)
    GetMessagesAsync(Windows.Devices.Sms.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<ISmsMessage>, int> GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)public IAsyncOperationWithProgress<ISmsMessage>, int> GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter)Public Function GetMessagesAsync(Windows.Devices.Sms.SmsMessageFilter) As IAsyncOperationWithProgress( Of ISmsMessage, int )

    Parameters

    Returns

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

Device family

Windows Desktop Extension SDK (introduced v10.0.10240.0)

API contract

Windows.Devices.Sms.LegacySmsApiContract (introduced v1)

Capabilities

sms
cellularMessaging

Attributes

Windows.Foundation.Metadata.DeprecatedAttribute
Windows.Foundation.Metadata.DualApiPartitionAttribute
Windows.Foundation.Metadata.ContractVersionAttribute

Details

Assembly

Windows.Devices.Sms.dll