I wanted to play a simple .wav file in B4i, but after searching and searching I couldn't find a clear example of how to do it. An example of how to play a default IOS sound would also be useful. Thank you very much.
From what I read, I came with this useless code:
The .WAV file is located in Project\B4i\Files\Special
From what I read, I came with this useless code:
B4X:
Private Sub Application_Start (Nav As NavigationController)
NavControl = Nav
Dim PagesManager As B4XPagesManager
PagesManager.Initialize(NavControl)
NavControl.NavigationBarVisible = False
' Codigo personalizado
OriginalServer = Servidor
App.RegisterUserNotifications(True,True,True)
.....
Sub PlaySound(Archivo)
Dim n As Notification
n.Initialize(DateTime.Now)
Dim no As NativeObject = n
n.PlaySound = True
n.AlertBody = "Mi mensaje."
If App.OSVersion >= 8.2 Then
no.SetField("alertTitle", "Check point")
'Custom sound
no.SetField("soundName", Archivo)
n.Register
End If
End Sub
The .WAV file is located in Project\B4i\Files\Special