Hi!
I am trying to use the 'Toybox.Attention' from a background process, but I am getting following error:
import Toybox.Background;
import Toybox.System;
(:background)
class BackgroundServiceDelegate extends System.ServiceDelegate {
public function initialize() {
ServiceDelegate.initialize();
}
public function onTemporalEvent() as Void {
System.println("Background event occured!");
var vibeData =
[
new Attention.VibeProfile(50, 2000), // On for two seconds
new Attention.VibeProfile(0, 2000), // Off for two seconds
new Attention.VibeProfile(50, 2000), // On for two seconds
new Attention.VibeProfile(0, 2000), // Off for two seconds
new Attention.VibeProfile(50, 2000) // on for two seconds
];
Attention.vibrate(vibeData);
// Background.requestApplicationWake("Your timer has expired!");
Background.exit(true);
}
}
Am I missing some configuration, is there something else I am doing wrong, or is that simply not possible?
If this is not working, is there a way to avoid the confirmation dialog at `Background.requestApplicationWake`?
Kind regards
Daniel