Android Question who to play notification sound?

SMOOTSARA

Active Member
Licensed User
Longtime User
Hi guys
How can I play notifications sound on my device?
For example, by pressing a button...
B4X:
    Dim Effect As Int = 3
    Dim Vol As Float = 5.0
    Dim CTX As JavaObject
    CTX.InitializeContext
    Dim AM As JavaObject = CTX.RunMethod("getSystemService",Array("audio"))
    AM.RunMethod("playSoundEffect",Array(Effect,Vol))
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…