android connection bluetooth auto - android

I found some good tuto on google to create an application with bluetooth, but I found nothing to connect the bluetooth and manage automaticaly any devise by the system (like keyboard, mouse, headphone).
(I dont want to create a new use of bluetooth, but only manage connexions).
Do you have any idea to do this ?
Thanks for your answers,
Alex

Related

How to set up One to Many connections without any user interactions

We found multiple ways to connect two device with a Peer-to-Peer connection using things like Bluetooth and Wifi direct. Problem is, each device need the user to accept or confirm the connection.
We would like to make a One to Many system where everyone can connect to one device. This device need to manage all the connections incoming without any user interaction (really independant) and then display in our activity some informations receive from all the connected device.
We're looking for some good examples on how we can do this. Thanks
Cant you just use basic TCP Server?
EDIT/Answer to comment:
Yes it is possible, here is one of my sample apps, tho servers can be created on ports above 1024

Connect to Bluetooth Device Programmatically

I have seen several questions about this topic but none are answered, complete, or actually have answers "to the question asked".
I have a phone which has bluetooth tethering turned on and a tablet which is paired with the phone. Problem is that to get the connections started I must open the bluetooth menu on the tablet and click on the phone's name to actually connect. I would like to have my custom app which runs on the tablet emulate this button click programmatically.
Many online suggestions require creating a socket; however, I do not want to transfer my own data. I only want to "connect" to the device using whatever the default android interface is. (Unknown to me)
I suspect there must be some kind of intent that can be sent to trigger this connection but can't find it.
Currently android has not exposed the classes inorder to connect to Bluetooth PAN profile. Only HEADSET, HANDSFREE and A2DP classes are exposed to interact with them. However, you can dig into the bluetooth framework and identify the classes for PAN profile and use reflection to acheive this. This approach may fail and not guranteed to work as expected.
Refer more in the official documentation
Refer more on accessing Bluetooth classes using Reflection
Enable Bluetooth tethering programmatically

Android: connecting two device without internet

I am developing an application. In which the idea is like - i want to connect two devices as two mobile or two tabs or mobile to tab or mobile to server or tab to server. Means i want to send data from one device to other device mostly xml.
I want to connect two devices with out internet and blue tooth, I want to connect them with wifi having no internet. And than want to transfer data.
My point is i am having an application which is used to generate a xml and after generation of xml i want to send it to other device or tab or desktop server on a button click.
I searched on Google and found Ad-hoc network, but it is quite difficult to understand me. Is any other way by which i can easily understand Ad-hoc or other way by which i can connect.
So please guide me what should i do, how can I achieve my task. I need your guidance and suggestions.
Socket connection would be a great idea in your situation, you dont need to have Internet to do so. Here is one of many examples if you google it: http://examples.javacodegeeks.com/android/core/socket-core/android-socket-example/
Hope this helps
You can use iJetty. iJetty can be configured to use in your application and when you start wifi router on one android device another can get connected on that device and if it's your client applciation you can configure it to look on a specific port.
Try this : http://puregeekjoy.blogspot.in/2011/06/running-embedded-jetty-in-android-app.html
You could use Wi-Fi Direct if your version of Android is 4.0 or later and your hardware works with it.

Android Mouse Motion Control App

This is more of a general question i suppose...
I am looking to start to make an app which will connect to my pc via bluetooth and then control my mouse. I am wondering if any people know where to start or know of any places to get a tutorial from. I know basics about how to connect via bluetooth to a device, but dont have a clue where to being with motion conrol tutorials etc
thanks
I imagine that you'll have to write an application on your pc that would communicate with the device and also with the mouse. There might be some sort of pc-side UI testing apps (analogs to Monkey) that you could harness for this.
You can use tomcat Apache server or any other server which will receive mouse events sent from android mobile.

Bluetooth + simulating mouse

anyone know if its posible to make an application to simulate a touchscreen mouse or trackpad by bluetooth??
How can I make that the PC (or MAC) knows me as a mouse device?
Regards,
Juan
You should have a look at the Bluetooth HID specification. It may be possible, depending on the stack of the device that you are using to emulate a mouse/trackpad. I'm not familiar with the stack on Android (assuming that's the platform you're using from the tag on your question) so I don't know if it's possible from there.
Essentially, you create a HID service on the L2CAP protocol. The service record specifies the HID descriptors which describe the data being sent from emulating device. The HID driver on the host computer should be able to interpret that data.
It might be useful to try to connect to another Bluetooth mouse/trackpad from the desktop (Bluecove on a stack other than Microsoft is a good way to hack around in Bluetooth). Have a look at the service record for the HID service on the mouse/trackpad. Also, look at the data coming from the mouse/trackpad for an idea of what needs to be sent and when.
Alternatively, you could write a server application on your computer that communicates via another Bluetooth protocol (e.g., RFCOMM/SPP) to the input-device emulator app running on your phone. The server application would simulate the input device (e.g., move the mouse pointer around on the screen, etc).
Instead of creating your own project why dont you contribute to the remotedroid project?
I'm assuming you know your bluetooth api's well. Remote droid uses Wifi and OSC messaging to communicate with the PC.
Yes you may use GlovePie with the wiimote connected to BlueSoeil, It will alow you to do anything with you computer with the wiimote. It also has a Language it uses
I think you want this:
Serverless Bluetooth Keyboard & Mouse for PC/Phone
It's even open-source!
Unfortunately it is not open source, it just has a GitHub readme for some reason.
But still the app is quite good!

Categories

Resources