How to get the WPD device ID on a WPD device connect event? - wia

In WIA (Windows Image Acquisition), we have IWiaDevMgr::RegisterEventCallbackProgram() API to register an application to receive device events. I couldn't find any similar API in WPD (Windows Portable Devices) framework. Is there a way to get WPD device ID on a WPD device connect event?

Related

unpair dual-mode bluetooth device in uwp application

use Windows.Devices.Bluetooth.Advertisement.BluetoothLEAdvertisementWatcher to discover the device
Windows.Devices.Bluetooth.BluetoothLEDevice.FromBluetoothAddressAsync([address]) to get Windows.Devices.Bluetooth.BluetoothLEDevice
call Windows.Devices.Bluetooth.BluetoothLEDevice.DeviceInformation.Pairing.Custom.PairAsync(....)
because the device is a dual-mode bluetooth device, after pairing, there are same two device names I can see in the Windows Bluetooth list. And after calling the UnpairAsync api, I can only unpair the BLE device.
Is there a way to unpair both devices?

Using USB device on PC in Android Studio Emulator

I am developing an app that A dongle (USB) device must connect to Android OS supported device(mobile phones, tablets...) via OTG (On-The-Go) cable. The problem starts here. I need to do debug while the dongle is connected to the Mobile phone. Unfortunately, such situation makes connecting mobile phone to PC and debugging method impossible. ( Mobile phone has 1 socket but I need 2, one for connecting the dongle to mobile phone and other for connecting mobile phone to pc for debugging)
Is there a way such that the Android Studio Emulator can access to USB device on the PC?
EDIT I have found an alternative way like connecting the mobile phone to PC via Bluetooth which is explained here.
EDIT 2: A better and clear way : Installing Genymotion and Virtual Box.
Another option (I use daily) is
adb connect phone_ip
The phone should be connected to wifi (the host also).
Lots of sources for that on the net (here is one)
mordy.

What Device Class is a TV or Projector?

I am trying to figure out what class and GUID a TV or Projector belongs to in Windows OS?
Theres over 20 of them and I'm not sure which one a TV or Projector is part of. Here is the complete list
I suspect its one of the following HIDClass, Monitor, Media, etc.
DONT CLOSE THIS: I need to know this because knowing what class a TV is will tell me what GUID I need to use for the function SetupDiGetClassDevs(). This a relevant programming question!!
Here are the differences between HID and USB device APIs:
API Namespace Access type
USB Windows.Devices.Usb exclusive read & exclusive write
HID Windows.Devices.HumanInterfaceDevice shared read & exclusive write
Here are some CLSIDs for Device specific toolbars:
CLSID Device
{29c93b94-45ef-44b3-8ad5-5ec104e0f9c6} NEC LCD Projectors Toolbar
{b686afa8-7ca2-4c19-b9a8-ed364f126907} AOL Television Toolbar
References
Windows Store device apps for internal devices
Windows Media SDK, How to determine a device is a media center device?
Multimedia Streaming on Microsoft Windows CE 3.0
CLSID List: Television

How to turn on LoudSpeaker Mode in Windows Phone 7.1

I am planning to put the device in loudspeaker mode from my win phone application. (Like on click of some button)
Are there any APIs or workarounds to do so on Windows Phone 7.1?
There is no API available to control a loud speaker or speaker phone mode.
You can only control the relative volume of any sound you're directly playing.

Windows Phone 7 emulator support any GPS device for development

I am developing for Windows Phone 7.
My application uses GeoCoordinateWatcher to detect user current position.
Now my client is asking me to test GPS functionality. But i don't have Windows Phone 7 mobile available here. I want to connect a GPS receiver with my laptop and somehow connect that to Windows Phone 7 emulator so the emulator would receive the data from my USB GPS receiver.
Is it possible?
You can try Kevin D. Wolf's GPS simulator for Windows Phone 7.
It will allow you to test the GPS fonctionality of your app without any GPS device.

Resources