Android Question Setting notification for my app not working

CorbettMessa

Member
Licensed User
Longtime User
I am trying to use the code below to set a notification ringtone. I have tried it using RINGTONE and NOTIFICATION, but it does not seem to work for just my app. Actually the NOTIFICATION part does not work at all, but the RINGTONE does work, but it sets the default for the entire phone, not just my app. I just want to set the NOTIFICATION sound for this app, can I do that?

Code: Copy
Sub addRingtone_click
Dim Uri As String

Uri = RM.GetDefault(RM.TYPE_RINGTONE)
RM.ShowRingtonePicker("RM",RM.TYPE_RINGTONE,False,Uri)

End Sub

Sub rm_PickerResult (Success As Boolean, Uri As String)
    If Success Then
        If Uri = "" Then
            ToastMessageShow("Silent was chosen", True)
        Else
            RM.SetDefault(RM.TYPE_RINGTONE,Uri)
            ToastMessageShow("ringtone selected", True)
        End If
    Else
        ToastMessageShow("Error loading ringtone.", True)
    End If   
End Sub
 

Similar Threads

  • Locked
  • Question Question
Replies
6
Views
4K
  • Locked
  • Question Question
Replies
1
Views
2K
Replies
10
Views
6K
  • Question Question
Android Question Stop A Ringtone
Replies
12
Views
7K
  • Question Question
Android Question Stop a ringtone
Replies
7
Views
5K
Back
Top