Is this possible to detect bluetooth device in web application using java bluetooth library?
As currently I have one button "Detect Device" in jsp page, which use server device's bluetooth and find nearest bluetooth enable devices by using jsr-82 (Bluecove). The issue is its detect bluetooth enable devices nearest to server (as it use server's bluetooth) not from the client device's bluetooth.In my case assume server is laptop as i had run my web app on it now i'm hitting request from another laptop1 than rather than using laptop1's bluetooth it still use server's (laptop) bluetooth to detect bluetooth enable devices.
I'm using Bluecore Library in app.
Any suggestion please
Related
I am making an Android app that will communicate via Bluetooth with other devices. These devices need to check WiFi hotspot. How can I, from inside the app, check if the phone is an WiFi hotspot?
I don't need to turn hotspot on from the application, just check if it has so I can tell the user to turn it on manually to be able to use the app.
EDIT:
I just realized the question is not really correct.
The phone with the app I am developing connects to internet via wifi. Then it needs to share internet with other devices via Bluetooth. The answers here worked fine to check if WiFi hotspot is on. But I need to check if it can share internet via Bluetooth with other devices.
The phone gets internet via wifi, but the devices have to get internet via Bluetooth.
I am working on an app that will act as a dashboard for an electronic card installed in cars and trucks.
I need the application to be able to receive data from this card, so I can display it in various ways on the app.
We chose Wifi for the communication method. To access the card, my app is able to connect to a Wifi network created by it.
I would like to receive JSON sent by the card every second.
I need help on where to start to make the two devices communicate, and what are the good practices on implementing this kind of communication.
The app basically act as a client, and the card as a server.
I found something about sockets, but it seemed to use two Android devices, a server and a client, so I'm kinda stuck here.
I use Android Studio 2.1.2 with the Android APIs ranging from 19 to latest.
One option is to broadcast with UDP the data within the local network. The moment the android device connects to the wifi network it will be in its local network. So the data can be received at the android end with a multicast receiver(check out http://jgroups.org/ ).
Refer example
It may also use the p2p sharing with TCP and bind the device with static IPs for communication. Create a simple socket receiver at the android end and a service at the device end. Depends on the way you choose it.
I am working on a project where I have to connect my android device (LG G3) to a GPS with usb. I can't figure out how I can get the data out of my GPS and I do not want to use the device it's internall GPS because I need to be pretty accurate.
If you want to program your own USB GPS to Android, you can take a look at USB Host
According to USB Host documentation:
When your Android-powered device is in USB host mode, it acts as the
USB host, powers the bus, and enumerates connected USB devices. USB
host mode is supported in Android 3.1 and higher.
To use an USB external GPS you have to enable Android developer Options on your phone and enable using mock locations so the service (your one or a third party one) can send locations to the system "bypassing" the internal location system.
There are several apps that can transfer GPS data to your application (take a look at Your are here GPS for example. This app also lets you wath NMEA data).
I need a suggestion to implement a bluetooth application:
it scan for devices and have to check if the discovered devices has the same application installed.
There's a way to do that?
From http://developer.android.com/guide/topics/connectivity/bluetooth.html
"a Bluetooth device within the local area will respond to a discovery request only if it is currently enabled to be discoverable. If a device is discoverable, it will respond to the discovery request by sharing some information, such as the device name, *class,* and its unique MAC address. Using this information, the device performing discovery can then choose to initiate a connection to the discovered device.
So i guess the device need to accept the connection to get more information about installed apps and other.
Hi: I want to implement a http remote control for an Android application: From a browser on a computer in the local area network the application running on the Android device should be controlled.
Are there any recommendation how to implement this? I heard about i-jetty but it is not uncomplex to integrate it into an existing app.
The problem you're going to run into here are:
Android devices are mobile. They do not have a fixed IP address or DNS address. You'd need to implement some sort of discovery service.
Android devices move between networks, and some networks will have NAT. You won't always be able to contact the device.
My advice here would be to use the new Android C2DM service and push a command down to the device telling your application that there's a request waiting. Once the notification arrives, have your application contact a web server at a known address to see what the request actually is.
In other words, you'd be running an intermediary web server that proxies requests on behalf of your Android device.
More information about C2DM can be found here:
http://code.google.com/android/c2dm/