Open Kurom96 opened 7 years ago
Hello.
Notifications are playing with custom sound. When Android version 6 or higher, custom sound is not work ( notification sounds os default ).
code bellow
// Add this so Titanium will add the permissions and links needed to play sounds var sound = Titanium.Media.createSound(); var manager = require('bencoding.alarmmanager').createAlarmManager(); var current = new Date(); var options = { requestCode: 0, icon: Ti.App.Android.R.drawable.appicon, year: current.getFullYear(), month: current.getMonth(), day: current.getDate(), hour: current.getHours(), minute: current.getMinutes() + 1, second: 0, contentTitle: 'notification', contentText: 'good morning', playSound: true, sound: Ti.Filesystem.getResRawDirectory() + 'notification1', vibrate: true, showLights: true, repeat: 'daily' }; manager.addAlarmNotification(options);
notification1.mp3 placed in /platform/android/res/raw directory.
/platform/android/res/raw
Do you know the solution?
environment
Hello.
Notifications are playing with custom sound. When Android version 6 or higher, custom sound is not work ( notification sounds os default ).
code bellow
notification1.mp3 placed in
/platform/android/res/raw
directory.Do you know the solution?
environment