I came across a problem. If I try to start a period scan from a service, to run it we must call the onResume() method of the BleManager class, since it is not be called from the override of {@link android.app.Activity#onResume()}. The problem is that in the onResume method the m_isForegrounded flag is set to true, while by default it is false and does not allow the startPeriodicScan() method to run correctly.