Hi Guys,
We are working on an app that communicates with a Bluetooth device. As part of the requirements the app should be able to continue to do so in background mode, but not when the phone is locked. So we need a way/event to detect the lock/unlock actions.
I found this article, but not...
There are two ways to wait for a phone call. One is to have a service to monitor PhoneStateChanged event of PhoneEvents and other is to have a Broadcast Receiver service for android.intent.action.PHONE_STATE.
The benefit of Broadcast Receiver is that you don't need to worry about keeping your...
I have reworked my old code sample basing on StackOverflow example code:
Depends on: Phone lib
DO not forget at an activity to request PERMISSION_READ_PHONE_STATE.