如何在C#中通过蓝牙链接发送消息到移动 [英] How to send a link message to mobile via bluetooth in C#

查看:1211
本文介绍了如何在C#中通过蓝牙链接发送消息到移动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

My requirement is to send a link message to mobile via bluetooth in 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.

推荐答案

我会建议我的图书馆32feet.NET它.NET提供了蓝牙和OBEX支持。您可以轻松地通过OBEX例如发送一个文件/对象。

I would recommend my library 32feet.NET it provides Bluetooth and OBEX support on .NET. You can easily send a file/object via OBEX e.g.

' 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.$c$cplex.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.

这篇关于如何在C#中通过蓝牙链接发送消息到移动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆