Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows mobile 摩托罗拉symbol ES400通知_Windows Mobile_Symbols_Motorola - Fatal编程技术网

Windows mobile 摩托罗拉symbol ES400通知

Windows mobile 摩托罗拉symbol ES400通知,windows-mobile,symbols,motorola,Windows Mobile,Symbols,Motorola,这是我的led和蜂鸣器通知代码 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

这是我的led和蜂鸣器通知代码

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;

但是我看不到任何通知=/

你在什么地方订阅了通知了吗?我不熟悉这个特定的API,但我猜您需要使用某个事件成员

例如:

如果这不起作用,你可以试试摩托罗拉开发者支持论坛


-保罗

你在什么地方订阅了通知了吗?我不熟悉这个特定的API,但我猜您需要使用某个事件成员

例如:

如果这不起作用,你可以试试摩托罗拉开发者支持论坛


-PaulH

摩托罗拉通知API有点奇怪-您不创建自己的设备对象,而是从Device.AvailableDevices检索它们。比如:

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

上面的代码未经测试,但看起来非常正确-您需要验证是否已找到您的beeperDevice(这是一个结构,因此未找到时不会为null)。

摩托罗拉通知API有点奇怪-您不创建自己的设备对象,而是从Device.AvailableDevices检索它们。比如:

var beeperDevice = Symbol.Notification.Device.AvailableDevices
           .FirstOrDefault(d => d.ObjectType == NotifyType.BEEPER);    
var beeper = new Symbol.Notification.Beeper(beeperDevice);
上面的代码未经测试,但看起来非常正确-您需要验证是否已找到您的beeperDevice(它是一个结构,因此未找到时不会为null)