I have a caller id device as in the image. For Windows, this device works flawlessly. However, I need to get the phone number of the caller in my android application by connecting this device to the android device with otg cable. Does it support Android caller id devices or can I access the caller's phone number by listening to the usb port in my android application?
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 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 want my android app to automatically connect to a paired BlueTooth device as soon as this device is powered on. Right now I do it by checking every second, whether the device is in range or not but I hope there is a better way?
For example, can I register a receiver, which is executed as soon as a Bluetooth device is in range? (like with BluetoothDevice.ACTION_ACL_CONNECTED, but not for the connected-event but for a „in range“ event)
we have two android device A and B on different network and different IPs, we donot know the phone number of device A.Device B want to connect with device A i only know the application ID of the android Device A and Device installed the app and connected to internet. is there any technique to find device A on network through his application iD in a secured way using java language?
Maybe Google Cloud Messaging?
On many android devices, when the device is plugged into the USB port of a computer or even on some USB charging devices, the phone goes into USB Storage mode. When the device is in this mode, android apps cannot access the sdcard. Is there any way (1) to detect when the device is in this mode and (2) to programmatically turn off USB storage, at least temporarily, so my android app can access the sdcard?
I've seen other SO questions and the answers are not really sufficient
(e.g., Android: Detecting USB).
A1: If current state of Sd card is SHARED it means that it has connected to PC in MSC mode, you can check this case as following:
String state = Environment.getExternalStorageState();
if (Environment.MEDIA_SHARED.equals(state)) {
// Sd card has connected to PC in MSC mode
}
A2: You can force to turn off usb mass storage connection by calling:
MountService.setUsbMassStorageEnabled(false);
or
StorageManager.disableUsbMassStorage();
but unfortunately, both these API are not public accessible?!
You can detect it (you have the link), but, AFAIK, you can't mount/unmount USB storage at least not with the public SDK APIs. In Honeycomb (3.0 and above), USB mass storage is no longer used to access the device's external storage, so your app and a computer can access it simultaneously.