Been working on this all day and cannot find an answer.
Previously before Android Oreo, our app would allow users to change the tones of notifications through an html page via webview (our own UI ). We would display the tones located from the android system (ringtone mgr) and grab anything listed in the apps raw folder.
In the new android Oreo, we cannot easily change the ringtone of notifications, we have to use channels. So I had simply changed our UI to..
if(OS.version < Android Oreo)
---> continue to use the same UI and set tone.
if(OS.version >= Android Oreo)
---> create intent andstartActivity
for result -intent.setAction("android.settings.APP_NOTIFICATION_SETTINGS");
I thought everything was fine, but realized the app provided sounds I set originally on startup of the app are not in the list of sounds. So if the user goes to the channel settings, and changes the sound from the 'app provided sound' to anything else, there is no way the user can get that 'app provided sound' back without a re-install.
There is an option of default notification sound, however, it is not our default sound. (perhaps this is androids default notification sound....) The default notification sound should be the app provided sound.
I did discover there is one folder where i can put some notification sounds. Android\media\com.google.android.talk\Notifications and it will show up in that list of sounds, however, that may not be the same location on all phones, plus the user may not know which sound is the actual default sound.
Any ideas? Do I need to pass some extras that would make the default sound be the app provided sound? Do I need to add something to the manifest?