开发者

Motorola symbol ES400 notifications

开发者 https://www.devze.com 2023-03-05 09:11 出处:网络
This is my code for led and beeper notifications Symbol.Generic.Device device = new Symbol.Generic.Device();

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

0

精彩评论

暂无评论...
验证码 换一张
取 消