Set Notification Sound from Assets folder

前端 未结 6 678
北海茫月
北海茫月 2021-02-05 05:46

I am attaching the sound files in the assets folder for play sound in the notification but I am not able to play sound from the assets folder.

I have setting page from w

6条回答
  •  天涯浪人
    2021-02-05 06:08

    The correct path to load something from your assets folder is file:///android_assets/relative_path_to_your_file. Note the three slashes here. Although I have not tried to set a notification sound this way, I have used this with a WebView with success a number of times, and would expect it to work the same way.

提交回复
热议问题