SmsDevice.FromIdAsync(String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public:
static IAsyncOperation<SmsDevice ^> ^ FromIdAsync(Platform::String ^ deviceId);
/// [Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, Windows.Devices.Sms.LegacySmsApiContract)]
/// [Windows.Foundation.Metadata.RemoteAsync]
static IAsyncOperation<SmsDevice> FromIdAsync(winrt::hstring const& deviceId);
/// [Windows.Foundation.Metadata.RemoteAsync]
/// [Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
static IAsyncOperation<SmsDevice> FromIdAsync(winrt::hstring const& deviceId);
[Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, typeof(Windows.Devices.Sms.LegacySmsApiContract))]
[Windows.Foundation.Metadata.RemoteAsync]
public static IAsyncOperation<SmsDevice> FromIdAsync(string deviceId);
[Windows.Foundation.Metadata.RemoteAsync]
[Windows.Foundation.Metadata.Deprecated("ISmsDeviceStatics may be altered or unavailable for releases after Windows 10.", Windows.Foundation.Metadata.DeprecationType.Deprecate, 65536, "Windows.Devices.Sms.LegacySmsApiContract")]
public static IAsyncOperation<SmsDevice> FromIdAsync(string deviceId);
function fromIdAsync(deviceId)
Public Shared Function FromIdAsync (deviceId As String) As IAsyncOperation(Of SmsDevice)
参数
- deviceId
-
String
Platform::String
winrt::hstring
接收短信的 SMS 设备的 DeviceInformation ID 的字符串表示形式。
返回
SMS 设备操作对象。
- 属性
Windows 要求
应用功能 |
cellularMessaging
sms
|
注解
SmsReceivedEventDetails 接口处理收到的消息的详细信息;可以将 DeviceInformation ID 从该接口传递到此方法,以激活设备并检索其他消息详细信息,例如发送方和消息正文。 由于设备可能正忙,因此操作以异步方式执行。 异步操作对象立即返回。