Hello everyone.
I just started learning B4A and Android programming.
Now, based on the example from the SpeechToText library,
I made an application that contains a service, everything works as it should.
But as soon as I remove the application from the screen, the microphone stops listening.
How is it possible to make the microphone and, accordingly, SpeechToText work in the background?
Any help
you need to make your service a foreground service and set its foregroundservicetype to "mediaPlayback". you also need to add these permissions to the manifest:
"android.permission.FOREGROUND_SERVICE"
"android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK".
and probably turn off battery-saving options.