<How to get device location when a BTLE event trig...
# stackoverflow
u
How to get device location when a BTLE event triggers in broadcast receiver? I am statically registering Broadcast Receiver for BTLE connection/disconnection events to detect when my bluetooth headphones connects/disconnects with my Android phone. I also want to record the current location of my phone to update to a server when the OnReceive event for bluetooth is triggered. I am using FusedLocationProviderClient to get current location with fine, coarse and background location permissions declared in the manifest, but the location received is always null. How do I...