how to send text(command) via Bluetooth to handle robot from android device? -


my actual req controlling of robot android device. voice text conversion n send commonds matches text. start -1 ,here 1 command need send robot.....so can u please tell me procedure followed.

is possible send text instead of file??

there 3 parts have described: hotword detection, bluetooth server, , bluetooth client. follows short description of envolves.

for hotword detection, require registering service hotword. when hotword recognized android call service.

for bluetooth server, depending on how set either side server. create listening bluetooth server socket, use bluetoothadapter.listenusingrfcommwithservicerecord() , call accept(). blocking meaning don't use in main thread.

for bluetooth client, once again depending on how set either side client. connect listening bluetooth server socket, can use bluetoothdevice.createrfcommsockettoservicerecord() , call connect().

once bluetooth connection established can send , retrive data (for example string) using input , output streams.

when done connections don't forget close sockets.

any bluetooth device have similar. if it's not android powered robot, have specific api device.

for additional learning bluetooth communication between 2 android devices, have @ android bluetooth api guide , sample bluetoothchat.

cheers!


Comments

Popular posts from this blog

c++ - Delete matches in OpenCV (Keypoints and descriptors) -

java - Could not locate OpenAL library -

sorting - opencl Bitonic sort with 64 bits keys -