Infeasible
Status Update
Comments
gg...@google.com <gg...@google.com> #2
for example, many different devices return the same longitude and latitude.such as : longitude is 121.474000 and latitude is 31.230001.
i donnot understand why is the data the same?
i donnot understand why is the data the same?
lk...@gmail.com <lk...@gmail.com> #3
the fractional part of the location data is exactly the same.
vi...@google.com <vi...@google.com> #4
Thank you for reporting this issue. For us to further investigate this issue, please provide the following additional information:
What steps are needed to reproduce this issue? Frequency of occurrence?
Which Android build are you using? (e.g. AP4A.241205.013.A1)
Which device did you use to reproduce this issue?
Can you confirm if this issue is reproducible on a Pixel/Nexus device?
Please provide a sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:https://developer.android.com/studio/debug/bug-report#bugreportdevice
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
What steps are needed to reproduce this issue? Frequency of occurrence?
Which Android build are you using? (e.g. AP4A.241205.013.A1)
Which device did you use to reproduce this issue?
Can you confirm if this issue is reproducible on a Pixel/Nexus device?
Please provide a sample project or apk to reproduce the issue. Also mention the steps to be followed for reproducing the issue with the given sample project or apk.
Android bug report (to be captured after reproducing the issue)
For steps to capture a bug report, please refer:
Alternate method
Navigate to “Developer options”, ensure “USB debugging” is enabled, then enable “Bug report shortcut”. Capture bug report by holding the power button and selecting the “Take bug report” option.
Note: Please upload the bug report and screenshot to google drive and share the folder to android-bugreport@google.com, then share the link here.
j....@engisoft.com <j....@engisoft.com> #5
Please provide the requested information to proceed further. Unfortunately the issue will be closed within 7 days if there is no further update.
vi...@google.com <vi...@google.com> #6
I only aply permission android.permission.ACCESS_COARSE_LOCATION.I use android.location.Location in the program.
for example,we hava 100 users.
20 users returned the same location information, longitude is 121.474000 and latitude is 31.230001。
30 users returned the same location information, longitude is 122.474000 and latitude is 32.230001。
15 users returned the same location information, longitude is 120.474000 and latitude is 30.230001。
as for Android build,all versions have it.
I dont reprodouce this issue.
what may be the cause of this issue?please
for example,we hava 100 users.
20 users returned the same location information, longitude is 121.474000 and latitude is 31.230001。
30 users returned the same location information, longitude is 122.474000 and latitude is 32.230001。
15 users returned the same location information, longitude is 120.474000 and latitude is 30.230001。
as for Android build,all versions have it.
I dont reprodouce this issue.
what may be the cause of this issue?please
vi...@google.com <vi...@google.com> #7
We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
Description
I am experiencing an issue with BLE notifications on certain devices, specifically Google Pixel and Samsung Galaxy models. The problem occurs when receiving a response that is longer than the MTU size, causing it to be split into two parts. On these devices, I only receive the second part of the message.
When initiating communication with the BLE device, we first do the discoverServices() and set the MTU to 512.
After that, we send an initial message through a specific BluetoothGattCharacteristic.
Then, we expect to receive a JSON response from the device split into two parts due to its length. However, on Google Pixel and Samsung Galaxy devices, only the second part of the message is received (the method onCharacteristicChanged is invoked only once on the devices mentioned, meanwhile that is invoked twice on the rest of the devices we have tested).
The issue was detected with Android 14 and tested with the brand-new Android 15, but it has not been solved with the new OS update.
Any clue about what can be causing this behaviour? I have attached a code snippet below:
**Code:**
```
// STEP 1 - Connect to the BluetoothDevice
fun connect(device: BluetoothDevice, context: Context) {
try {
device.connectGatt(context, false, callback)
} catch (e: SecurityException) {
Log.d("Error connecting to ${device.address}")
}
}
private val callback = object : BluetoothGattCallback() {
// STEP 2 - Request the services after a successful connection
override fun onConnectionStateChange(gatt: BluetoothGatt, status: Int, newState: Int) {
try {
val deviceAddress = gatt.device.address
if (status == BluetoothGatt.GATT_SUCCESS) {
if (newState == BluetoothProfile.STATE_CONNECTED) {
Handler(Looper.getMainLooper()).post {
gatt.discoverServices()
}
} else if (newState == BluetoothProfile.STATE_DISCONNECTED) {
disconnect()
}
} else {
disconnect(status)
}
} catch (e: SecurityException) {
Log.d("onConnectionStateChange: Error occurred $e")
}
}
// STEP 3 - MTU request after a successful discoverServices()
override fun onServicesDiscovered(gatt: BluetoothGatt, status: Int) {
try {
with(gatt) {
if (status == BluetoothGatt.GATT_SUCCESS) {
requestMtu(512)
} else {
disconnect()
}
}
} catch (e: SecurityException) {
Log.d("onServicesDiscovered: Error occurred $e")
}
}
// STEP 4 - Send message after setting the MTU properly
override fun onMtuChanged(gatt: BluetoothGatt, mtu: Int, status: Int) {
if (status == BluetoothGatt.GATT_SUCCESS) {
deviceBluetoothGatt!!.services?.firstOrNull { it.uuid == serviceUUID.uuid }?.let { service ->
val characteristic = service.characteristics.first { it.uuid == readCharacteristicUUID }
try {
deviceBluetoothGatt!!.findCharacteristic(characteristic.uuid)?.let { _ ->
val payload = when {
characteristic.isIndicatable() -> BluetoothGattDescriptor.ENABLE_INDICATION_VALUE
characteristic.isNotifiable() -> BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE
else -> error("${characteristic.uuid} doesn't support notifications/indications")
}
characteristic.getDescriptor(configurationCharacteristicUUID)?.let { cccDescriptor ->
if (!deviceBluetoothGatt!!.setCharacteristicNotification(characteristic, true)) {
return
}
cccDescriptor.value = payload
deviceBluetoothGatt!!.writeDescriptor(cccDescriptor)
} ?: this@BLEManager.run {
Log.e("${characteristic.uuid} doesn't contain the CCC descriptor!")
}
} ?: this@BLEManager.run {
Log.e("Cannot find $characteristic.uuid! Failed to enable notifications.")
}
} catch (e: SecurityException) {
Log.d("onMtuChanged: Error occurred: $e")
}
}
} else {
Log.d("onMtuChanged: Error occurred $e")
disconnect()
}
}
// STEP 5 - Receive the message on this callback in blocks
override fun onCharacteristicChanged(gatt: BluetoothGatt, characteristic: BluetoothGattCharacteristic) {
with(characteristic) {
decodeResponse(characteristic.value)
}
}
override fun onDescriptorWrite(gatt: BluetoothGatt, descriptor: BluetoothGattDescriptor, status: Int) {
with(descriptor) {
when (status) {
BluetoothGatt.GATT_SUCCESS -> {
writeCharacteristic(GetinfoRequest().encode())
}
BluetoothGatt.GATT_WRITE_NOT_PERMITTED -> {
Log.d("Write not permitted for $uuid!")
}
else -> {
Log.d("Descriptor write failed for $uuid, error: $status")
}
}
}
}
}
```
**Additional Information:**
- Android versions tested: Android 14, Android 15
- Devices affected: Google Pixel 6A, Galaxy Tab S8