How to control pc notepad by bluetooth enabled android device?
hassan naveed
Greenhorn
Joined: Feb 16, 2012
Posts: 8
posted
0
I want to connect my android fone to pc by bluetooth and want to open notepad on pc. Then I want to write words on mobile but it should later write on my pc note pad. can you please tell how can i do that. I had a look at the bluetooth chat code on android website, it looks quite promising for what i want to do, bu i dont know if that is the rite code for it..please help!!!
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35254
7
posted
0
Using punctuation would make this easier to understand; you can edit your post to add that.
Chat Example is very good for starting fun with bluetooth , you can use SPP profile (Bluetooth has many profiles, SPP is one of many )
SPP is a simple virtual COM port, you can put and receive data as a simple arrays of bytes ;)
When you connect to other bluetooth device you must create socket, the socket must contain information about of using communication like :
- type of connection (RFCOMM, L3CAP ... ) in your problem you should use RFCOMM, *
- socket type (new or connect to existing socket)*
- encryption and authorization*
- channel (1 - 30, bluetooth 2.1 use 30 channels to communication)*
- UUID (identifier of services, when you connect to other android device you can use your own UUID, but when you connect to other non android device you must use SPP UUID identifier)
* - you can't set those options in BluetoothDevice object, you can only set UUID. To use those options you need to using reflection uncover hidden methods some methods are uncovered in new version of Android 3.0 and newer.
You can install BlueSolei, it will activate SPP profile (on other device) otherwise you could probably not be able to connect.
Rest is contained in CHAT EXAMPLE ;) Have a good time ;)
Bye sorry for my english I am still learning
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to
run our stuff on 16 servers instead of 3.
subject: How to control pc notepad by bluetooth enabled android device?