I'm wondering if it's possible for a Phonegap-based app on one android device to communicate with another Phonegap-based app on another device via Bluetooth?
If it's possible to do this kind of thing with some native Java code for Android, then it should be possible via Phonegap by wrapping that code up as a Phonegap plugin, right...?
From the Android documentation on Bluetooth, I understand one device needs to act as a server and listen for incoming connections and the other "client" needs to initiate by connecting to the server. This would work in the scenario I'm envisaging with two slightly different apps, a "master" app running on a tablet which controls a "slave" app running on a phone, for example.
This BluetoothSerial plugin seems like it might be useful, as it provides functionality for both listening and for initiating a connection. Has anyone use this plugin for communication between android devices?
Check the following two links hope it will answer your question:
https://github.com/don/BluetoothSerial/blob/e1f1b330747c7c656e567bbd51a568067337e756/README.md
https://github.com/don/BluetoothSerial
Related
I have an app built in AppSheet (Google's codeless app building solution). My app can't use my device NFC (Android Smartphone), but it can work with webhooks. I'm trying to figure out if there is a way to have a service running and listening on my device which I could post my data to be transfered through NFC (something like a server listening in localhost:8080). I did not find any solution to this yet.
Do you know any approach like this? Thank you!
There is a System NFC service already running on Android phones that handles all NFC interaction, you communicate to it via the Java/Kotlin API's.
I don't know if Google's AppSheet has a method to interact with the System NFC service many other languages/development platform do have.
I'm developing Flutter app for Android, where I want to exchange some data between few instances of my app on different devices via Bluetooth. I'm using flutter_bluetooth_serial package (this is the only package I found which supports Bluetooth Classic, not Bluetooth Low Energy). I'm able to make connection
between device 1 and device 2 using BluetoothConnection.toAddress(device.address); (but even there was a problem, I had to modify the plugin and apply this workaround to make connection work).
Now I want to run my app on device 2 (which is connected with device 1) and send or receive some data, but I have no idea how I can do that using flutter_bluetooth_serial. In device 1 where I create connection I can use result of BluetoothConnection.toAddress(device.address) to send or listen for some data, but on device 2 I can't use it, because connection is already established by device 1 and I can't see another API for communication.
To simplify: let's say I want to achieve something more or less like Bluetooth chat functionality in this example application, but between multiple Flutter applications, not Flutter app and raspberry pi.
Is there any way of solving it with use of flutter_bluetooth_serial or any other package? Or I have to write some native Android code?
I have an embedded device that exposes its functionalities via a RESTful Web service. I want to consume those Web services via my android device by connecting my mobile to the embedded device via Wifi? Is it possible to do so?
The possible use cases are transferring the control panel UI of the embedded device to the android and controlling it remotely. The UI is exposed as a REST endpoint.
If the chip you are using supports Wi-Fi Direct, you should search for its code yourself since I don't know about it really, but you can find documentation and examples of wifi direct here, and if it doesn't support it, there are two scenarios, one is that you want to make your android device a server and your chip a client, which leads you to use Nanohttpd in your android code to make a server, and the other one is to bring up a server on your chip and make your android device a client, which leads to using a library like loopj which saves lots of pain. so I guess that was all.
I have heard of communication between two android devices using that touch method or however that works. I understand that communication over WiFi is not a problem. I need to know if it is possible to create an app that would run on multiple devices but in the end would compile data collected on each device into one main database all done without WiFi. It just sounds like a hogwash idea in my mind but is this possible?
There is app call SuperBeam.You'll need SuperBeam installed on both devices and then you'll need to pair the devices using any of a number of methods, including QR Codes, NFC, or by typing a manual code.
https://www.youtube.com/watch?v=hGAAE7qru6g
youtube link if you want to see how to use SuperBeam app
Correction:I tought this app don't use wifi but i guess this app for devices aren't connect to the same Wifi
The scenario:
I have a android app running my in cellphone. I´m the owner of this app.
I have a google-glass synced with this cellphone. I´m developing a my app for google-glass using the new GDK launch a few weeks ago.
I want to send a data from glass to cellphone and then receive a answer.
No internet connection is necessary, so i´m planning to use Bluetooth to this data communication.
I can create a Bluetooth socket connection, however this will obligate me to manage it.
There is no android high level abstraction that permit me to call a service or a activity directly on the cellphone?
AFAIK, there's no direct pipe between them, the glass is basically a phone with a different set of inputs and outputs. You can create and manage the connection, and it's yours.
AFAIK, there is no other way to do this, as Travis said there's no direct pipeline between them, seems to be true. You can use use BLUETOOTH Chat Application included in the Android SDK.
Just change the input method to voice input in the application
Install that Application in both the devices
Try It
change the code accordingly to send files too.