Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

Alarmsound of locale notifiaction runs only one time

$
0
0

Hi,

I have implemented an alarm timer for ansdroid and iOS. iOS works fine. In the app the user can start a timer with a selected text, sound and time. I'm using Bens alarmmanager (it is a "wrapper" to locale notification)

With this code I start the timer from UI:

var AlarmModule= require('bencoding.alarmmanager');
AlarmModule.enableLogging();
var notification = {
       requestCode : alarm.id + alarm.eta,
       second : alarm.duration,
       icon : Ti.App.Android.R.drawable.appicon,
       vibrate : true,
       contentTitle : 'Labortimer',
       contentText : alarm.label + ': duration=' + formatTime(alarm.duration) ,
       playSound : true,
       sound : Ti.Filesystem.getResRawDirectory() + sound.toLowerCase()
};
AlarmModule.createAlarmManager().addAlarmNotification(notification);
Here my question on github

Issue: It works first time of calling. If I start the timer again after ca. 1 min. then a new alarm with new reqestCode will generated and on tray I see in the same strip my new notification, but the alarm remains silent. If I swipe out the strip in tray center it works again. Andy ideas to fix or better solution?

Cheers!

Rainer


Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>