As a beginner, I ask for help with 2 questions:
Is it possible to check if the phone's speaker is turned off by connecting it to headphones? If YES, how can I activate the speaker, e.g. turn off the Bluetooth connection?
When a certain event occurs, how can I bring the app to the foreground when the lock screen is turned on or another app is in use?
Thank you in advance!