如何在C#中通过蓝牙链接发送消息到移动(How to send a link message to

2019-11-01 06:12发布

我的要求是通过蓝牙在C#中发送一个链接消息到移动。 该消息应该包含一些超链接。 而当用户打开该邮件应该直接在浏览器中打开链接。

它应该工作而无需安装在移动设备中的任何其他应用程序。

Answer 1:

我不知道这是可能的。 通常有浏览器中的一些安全预防措施,则可能是自动启动的一些限制。

据我所知道的网址检测和电子邮件地址检测是由设备自动完成的。 所以,你不必担心对消息的内容。

http://www.programmersheaven.com/2/Transferring-Files-and-Monitoring-Bluetooth-Ports



Answer 2:

我会建议我的图书馆32feet.NET它在.NET提供了蓝牙和OBEX支持。 你可以很容易地通过OBEX如发送文件/对象

' The host part of the URI is the device address, e.g. IrDAAddress.ToString(),
' and the file part is the OBEX object name.
Dim addr As String = "112233445566"
Dim uri As New Uri("obex://" & addr & "/HelloWorld.txt")
Dim req As New ObexWebRequest(uri)
req.ReadFile("Hello World.txt")
Dim rsp As ObexWebResponse = CType(req.GetResponse(),ObexWebResponse)
Console.WriteLine("Response Code: {0} (0x{0:X})", rsp.StatusCode)

请参阅用户手册 ,并http://32feet.codeplex.com/

我不知道邮件中的链接。 我想,如果你发送一个音符一个超链接将被识别,用户可以点击它。



文章来源: How to send a link message to mobile via bluetooth in C#