Forum Index » Windows Development » How to get Tap action events from Jabra Speak 510   XML
 
Author Message
nxuser



Joined: 25/10/2019 07:32:50
Messages: 2
Offline

I would like to handle tap action events when user press an green or red handset icon in Jabra Speak 510. My app is written in C# and I use "GetRemoteMmiv2Focus" method to subscribe for the event. I supposed that if user press the icon it will fire an "RemoteMmiv2Input" event, but it doesn't happen.

My sample app code is as follow:

private IServiceFactory serviceFactory = new ServiceFactory();
DeviceService = serviceFactory.CreateDeviceService(AppId);
DeviceService.DeviceAdded += DeviceService_DeviceAdded;
DeviceService.RemoteMmiv2Input += DeviceService_RemoteMmiv2Input;

 private void DeviceService_DeviceAdded(object sender, DeviceAddedEventArgs e)
        {
            JabraDevice = e.Device;

            JabraDevice.GetRemoteMmiv2Focus(RemoteMmiType.MMI_TYPE_HOOK_ON, new List<RemoteMmiInput> { RemoteMmiInput.MMI_ACTION_TAP }, RemoteMmiPriority.MMI_PRIORITY_HIGH);
            JabraDevice.GetRemoteMmiv2Focus(RemoteMmiType.MMI_TYPE_MUTE, new List<RemoteMmiInput> { RemoteMmiInput.MMI_ACTION_TAP }, RemoteMmiPriority.MMI_PRIORITY_HIGH);
        }

private void DeviceService_RemoteMmiv2Input(object sender, RemoteMmiv2EventArgs e)
        {
            THIS EVENT IS NEVER FIRED! Why?
        }


Any hints, what I'm doing wrong, would be appreciated.

This message was edited 4 times. Last update was at 31/10/2019 04:27:02

prysm



Joined: 31/10/2019 11:03:55
Messages: 1
Offline

Try this:

DeviceService.SetHidWorkingState(HidState.GN_HID)

I had the same problem and it seems that this method enables the button events.
nxuser



Joined: 25/10/2019 07:32:50
Messages: 2
Offline

Yes, indeed, when SetHidWorkingState(HidState.GN_HID) is set, some buttons events are fired when tapping that buttons. But there is some kind of additional "logic" behind. This causes that e.g. if you tap green button again, device assumes that call is placed on hold and one of green LED starts flashing, or if method SetRinger(true) is executed, there is ring sound played by the device.

That's why I tried method "GetRemoteMmiv2Focus", but for some reason I can't get it to work, however this command in demo app causes that events are fired. I can't find what I do wrong...
 
 
Go to: