Question

This is my code for led and beeper notifications

Symbol.Generic.Device device = new Symbol.Generic.Device();
Symbol.Notification.Beeper sound = new Symbol.Notification.Beeper(device);
sound.Volume = 5;
sound.Frequency = 300;

Symbol.Notification.LED led = new Symbol.Notification.LED(device);
led.CycleCount = 5;
led.OffDuration = 2000;
led.OnDuration = 3000;

but I can't see the any notification =/

Was it helpful?

Solution

The motorola notification API is a bit odd - you don't create your own Device objects but instead retrieve them from Device.AvailableDevices. Something like:

var beeperDevice = Symbol.Notification.Device.AvailableDevices
           .FirstOrDefault(d => d.ObjectType == NotifyType.BEEPER);    
var beeper = new Symbol.Notification.Beeper(beeperDevice);

code above is not tested, but looks superfically correct - you'll need to validate that your beeperDevice has been found (it's a struct so will not be null when not found).

OTHER TIPS

Have you subscribed to the notification somewhere? I'm not familiar with this particular API, but I would guess there is an event member somewhere that you need to use.

For an example: http://msdn.microsoft.com/en-us/library/aa645739%28v=vs.71%29.aspx

If that doesn't work, you could try the Motorola developer support forum.

-PaulH

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top