问题
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.
回答1:
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. So you will not need to worry on the contents of the message.
http://www.programmersheaven.com/2/Transferring-Files-and-Monitoring-Bluetooth-Ports
回答2:
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)
See the User Guide, and 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.
来源:https://stackoverflow.com/questions/1356056/how-to-send-a-link-message-to-mobile-via-bluetooth-in-c-sharp