Category "foreground"

What's the best way to get the package name of the application in the foreground?

I'm working on an AOSP project and as part of that I'm modifying the Bluetooth SDK. I have made changes in android.bluetooth.BluetoothAdapter::getDefaultAdapter

Service stops running after a while on the real device ( > 40 minutes ) works on emulator

Friends, I created an android background service that is called every 2 minutes. When its called it starts listening for locationUpdates for GPS and NETWORK for