This is my code for led and beeper notifications
Symbol.Generic.Device device = new Symbol.Generic.Device();
Symbol.Notification.Beeper sound = new Symbol.N开发者_如何学Pythonotification.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 =/
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).
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
精彩评论