Skip to content Skip to sidebar Skip to footer

Where To Put Custom Sound File For Push Notifications In Ionic 2 For Android

I am using the push plugin in my Ionic 2 app. Now I want to use a custom sound file. I am sending the file name in my payload: options = {data: {title: 'Title', body: 'Body.', soun

Solution 1:

I found the answer:

You have to put it in:

platforms/android/res/raw/filename.mp3

For iOS I put it here:

platforms/ios/res/raw/filename.mp3

In your options it's important that you inform the filename WITHOUT the filetype:

options = {data: {title: "Title", body: 'Body.', soundname: 'filename'}}

Solution 2:

platforms/android/res/raw/ path not found ionic3. What to do? Shall I have to create manually?

Post a Comment for "Where To Put Custom Sound File For Push Notifications In Ionic 2 For Android"