I receive notifications with sound when the app is background. I need to continue same sound when the app is foreground too. So I need to get default notification sound. How can I get the default notification sound and play? Is there any example?
Sub PlayNotification (id As Int)
Dim no As NativeObject = Me
no.RunMethod("playNotification:", Array(id))
End Sub
#if objc
- (void)playNotification:(int)soundId {
AudioServicesPlaySystemSound(soundId);
}
#end if
Sub Application_ReceiveLocalNotification (LN As Notification)
'this event will fire if the scheduled notification happend when the app was running
hd.ToastMessageShow(LN.AlertBody, True)
PlayNotification ???
End Sub
Sub PlayNotification (id As Int)
Dim no As NativeObject = Me
no.RunMethod("playNotification:", Array(id))
End Sub
Sub Application_ReceiveLocalNotification (LN As Notification)
'this event will fire if the scheduled notification happend when the app was running
hd.ToastMessageShow(LN.AlertBody, True)
PlayNotification(1007)
End Sub
Sub PlayNotification (id As Int)
Dim no As NativeObject = Me
no.RunMethod("playNotification:", Array(id))
End Sub