简体   繁体   English

如何在C#中通过蓝牙向手机发送链接消息

[英]How to send a link message to mobile via bluetooth in C#

My requirement is to send a link message to mobile via bluetooth in C#. 我的要求是通过C#中的蓝牙将链接消息发送到手机。 The message should contain some hyperlink. 该消息应包含一些超链接。 And when the user opens the message it should directly open the link in browser. 当用户打开消息时,应该直接在浏览器中打开链接。

It should work without installing any other application on mobile device. 它应该可以正常运行,而无需在移动设备上安装任何其他应用程序。

I am not sure this is possible. 我不确定这是否可能。 Generally there are some security precautions in browsers so there might be some restrictions in automatic launching. 通常,浏览器中有一些安全预防措施,因此自动启动可能会有一些限制。

As far as I know the URL detection and email address detection are automatically done by the device. 据我所知,URL检测和电子邮件地址检测是由设备自动完成的。 So you will not need to worry on the contents of the message. 因此,您无需担心消息的内容。

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

I would recommend my library 32feet.NET it provides Bluetooth and OBEX support on .NET. 我建议我的库32feet.NET在.NET上提供蓝牙和OBEX支持。 You can easily send a file/object via OBEX eg 您可以轻松地通过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)

See the User Guide , and http://32feet.codeplex.com/ 请参阅《 用户指南》http://32feet.codeplex.com/

I don't know about links in a message. 我不知道消息中的链接。 I suppose if you send a note a hyperlink will be recognized and the user can click on it. 我想如果您发送便笺,则超链接将被识别,用户可以单击它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用PC通过蓝牙从PC将文件发送到Mobile - Send File Via Bluetooth from pc to Mobile With C# 在 C# 应用程序中通过蓝牙发送文件 - send file via bluetooth in c# application 我正在尝试使用C#通过蓝牙将文本文件发送到移动设备 - I am trying to send a text file to a mobile device via bluetooth using C# 如何在C#中通过电报Bot发送消息? - how to send message via telegram Bot in c#? 蓝牙在Windows 7 PC和C#中的移动设备之间发送/接收文本 - Bluetooth send/receive text between windows 7 PC and mobile in c# 如何通过c#中的蓝牙连接获取任何手机的MAC地址? - how to get MAC address of any mobile phone via bluetooth connection in c#? 尝试在C#中通过蓝牙发送字节时发生NullReferenceException - NullReferenceException when trying to send bytes via Bluetooth in C# 如何通过蓝牙将数据从C#发送到MagicBlue LED? - How can I send data via Bluetooth from C# to a MagicBlue LED? 如何通过蓝牙从Unity C#android应用程序向Arduino发送字符串? - How to send a string via bluetooth from a Unity C# android app to Arduino? C#Windows Mobile MC67移动计算机,如何通过Zebra RW420通过蓝牙进行打印 - C# Windows Mobile MC67 Mobile Computer , how to print using Zebra RW420 via Bluetooth
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM