I'm trying to use an Android device to control an Arduino through Bluetooth. I able to control an LED and a few component at the Arduino. But I don't know how to have Android receive data from the Arduino similar to how the BlueTerm application works.
How can I do this? I don't want to use the Amarino library, because I don't want to have to use an extra .jar.
I suggest using a small library called Amarino. I have used it in the past and it provides a VERY simple interface for communicating from Android to Arduino and visa versa. It has a great deal of tutorials and you can even read the creators thesis to get a full understanding of how everything works behind the scenes.
Related
I have 2 android applications 1st is running on android 4.4 and 2nd will be contemporary. I want to setup one to one communication between these two using socketIO, there will be thousands of such pairs at a time communicating with each other. How can I achieve this?
I have already tried and able to setup a communication with fixed port by following these websites https://socket.io/get-started/chat/. and https://socket.io/blog/native-socket-io-and-android/
Is it possible with or without knowing port in advance or any another method possible to achieve the need? Please elaborate the logic or any sample available to follow.
Thanks in advance.
So, I've created an app and I want to be able to Add bluetooth devices to it (BLE or not). After I've added them, i want to display them in a different activity. I've looked for lots of tutorials(Stackoverflow and others) but couldnt find something specific.
I am a beginner and i used Kotlin to create the app.
Not exactly sure what you're looking for, but perhaps this SensorTag sample app is a simple enough example of what you're looking to accomplish?
It relies on Kotlin Coroutines to scan for nearby SensorTags, then allows you to select one, which navigates you to another Activity and connects to it, then displays sensor data.
I would like to recommend to use the rxJava for the BLE Scanning. For scanning the tags for forground and background working fine '
For view the demo on github rxAndroidBle_github_demo
on this library handled all exception.
I hope this will work for you !
I realize that this is the kind of question that frequently gets a lot of (well deserved) "what have you tried" comments and down-votes, but I'm hoping that by the time I'm done asking I can avoid that.
I've been looking around but unable to find the answer to how one goes about writing an application that consists of the following three things:
An Android app that connects to a host device via bluetooth
Communication io layer that sends signals back and forth on
that bluetooth connection
A host resident native app (preferably Unity3D, or AIR) that can receive/send messages back and forth to the connected app.
I have written many Android applications so I am not in need of any kind of "getting started" hand-holding, rather I just need some guidance (preferably in the way of a web link or book tutorial) on what it takes to utilize bluetooth and how one actually communicates via it.
Thanks in advance for all useful tips.
Here are a few links that I found in terms of Bluetooth connections
First of all the dev guide(I assume you have already looked here, but if not this is a good place to start)
http://developer.android.com/guide/topics/connectivity/bluetooth.html
http://developer.android.com/reference/android/bluetooth/BluetoothDevice.html
This one is a basic tutorial on how to Bluetooth on android
http://luugiathuy.com/2011/02/android-java-bluetooth/
This is a long PDF on Bluetooth programming in general (I haven't read it, but from what I have seen it looks over in depth) it covers java and OSX, but not android
people.csail.mit.edu/rudolph/Teaching/Articles/BTBook.pdf
Here is a similar SO question which might contain helpful links
Code samples for Android Bluetooth programming
This is the best Bluetooth open source project that I could find for android, it doesn't fit your description over well, but here it is anyways
http://code.google.com/p/bluetooth-remote-control/source/browse/#svn%2Ftrunk%2Fsrc%2Fpro%2Fapus%2Fblueremote
I realise that a lot of these links are simpler than what you really want, if I find anything more complicate I will add that.
I wish to perform device-to-device file transfer over Bluetooth in my Android application. Currently I have written the code necessary to make connections between multiple Bluetooth devices and I have retrieved connected BluetoothSockets for data exchange.
Is there a library available which implements file transfer that can be given a socket, or streams to use?
If not, can someone point me towards information about implementing the ability myself?
I am very new to file transfer programming and Bluetooth, so any help is appreciated.
Also, because I want this functionality built into my app, I am not looking to just run some other end-user app on the phone, I really do need to be able to code against this functionality (whether via a library, or my own implementation).
Normally over Bluetooth you would use something like OPP.
However that doesn't seem to be implemented on Android yet...
What I would do, is try serializing the data and sending it via RFCOMM or SPP bit by bit. For XML there is XStream, or, even simpler, Google's Protobuf.
Let me know if it works.
I have an android tablet and have an application installed on it... Now i need to control this application on the tablet through my android device... is there a way to do such thing?
Explore this example project by Google
http://developer.android.com/resources/samples/BluetoothChat/index.html
see how it works and try to implement your programming skill to transform this chat application to your idea...
How ever I am assuming that you are the author of application which you have desire to control.
happy coding.
EDITED:
Logic structure is simple both application should be able to detect bluetooth and paired(connect) with each other for communication. once you have communication instead of sending message(in chat) you send some information via buttons which will execute some methods on tablet...Just a thought... As if in chat application you can update and add messages to your thread...this application will help you to reach goal. Lot of work though!
If you are familiar with Sockets, this shouldn't be a problem for you, because the Bluetooth-connection and communication in Android is very much the same. See the Bluetooth-Tutorial and Googles "Bluetooth-Chat" example.