iOS Question Notification with custom sound

CaptKronos

Active Member
Licensed User
I'm currently using the following to create a notification with the default sound but would now like to use a custom sound. Is it possible?
B4X:
Dim ln As NativeObject
ln = ln.Initialize("UNMutableNotificationContent").RunMethod("new", Null)
Dim n As NativeObject
ln.SetField("sound", n.Initialize("UNNotificationSound").RunMethod("defaultSound", Null))
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Why are you using this code instead of Notification?

 
Upvote 0

CaptKronos

Active Member
Licensed User
It's because I need to add an image to the notification:
Sorry, I should have mentioned that in my initial post.
 
Upvote 0
Top