This may seem like a strange request, but how do I hide the media player on the lock screen. Currently I pop a notification up using UserNotificationCenter Class, and also play a looping sound with the media player. This is intention that the user needs to perform a function in the app, so a single notification beep is not sufficient. Or maybe is is possible to play a looping custom sound on the notification ?
This is not relevant to the application. If the app is not running then the Notification is not produced. All notifications are local, generated by the app itself.
Example of a func that creates notification if the app is in the background and plays audio,
B4X:
Sub start_warning
' // do notification
If tmrBackground.Enabled Then
UNC.CreateNotificationWithContent("Health Check","Are you OK ?", "healthcheck_1", "", 1000)
End If
mpOK.Initialize(File.DirAssets,"ok_chime_1.mp3","")
mpOK.looping = True
mpOK.play
tmrCheckShake.Enabled = True
inWarning = True
mod_functions.writeLog($"main(), start_warning ${inWarning}"$)
CallSubDelayed(Me,"confirmOK")
End Sub