I'm trying to make an application that monitors the environment, listens for noise. At the service level, I process data from the microphone, but when the smartphone falls asleep, microphone control stops. I tried to deal with the blocking of the microphone, but I did not succeed. It may be easier to periodically wake up the smartphone so that the screen of the smartphone is lit and activated. It is possible to force the smartphone to periodically wake up, provided that the battery saving issues do not bother me.