Intent or callbacks to know output devices selected when call in progress - android-11

Steps:
Connected wired headset and Bluetooth headset.
Receive an incoming call to the device where WHS and BTHS are connected.
Accept the call. Switch to different output devices like Speaker, WHS, BTHS.
I am using android 11. When call in progress, we can select different output devices such as Speaker, WHS, and BTHS. Is there any intent or callback to notify voice call routed to speaker/wired headset/Bluetooth headset?
On hot plug connection/disconnection, events will have listened. Based on the connection/disconnection event, we can perform our operation. But on the soft switch(selecting output devices from call application when call in progress), do we get any indication that output device for voice call stream got changed, so other applications can listen to intent/callback to carry out my customized operation.

Related

I have multiple monitors connected, when any of the connected monitor is power off, notify with the pop up message using windows message.(WindowProc)

I have multiple monitors connected to my main monitor, if any of the connected monitor goes off(power off state). It should be notified. I have tried with several messages like WM_DEVICECHANGE, WM_POWERBROADCAST and WM_DEVMODECHANGE. But nothing seemed to work, because WM_DEVICECHANGE notifies when the connection is removed/connected and WM_POWERBROADCAST also didn't seem to work, when my second monitor goes to power off state.

Linux device driver char device synchronization between unregister and release

I have a device driver with misc_register() API being called to create a serial device. Now, I want to call misc_deregister() because the device does not function any more due to hardware change (for example removal of cable of the serial port). Now the application has opened this device and performing operations on it, so there is an open file descriptor for this device.
I want to know if the driver wait for the application to call release (or close() API) on the device before calling misc_deregister()? Or can the driver call misc_deregister() and then it can still receive a (last) release callback?

iBeacon: can broadcaster iOS device get notified if client receives a beacon or enters its region?

I have two iOS devices; one is sending beacons using peripheralManager, beaconPeripheralData, etc. The second, a receiver device, is currently scanning for regions and beacons of the same UUID using didEnterRegion, didRangeBeacons, etc.
Is there any method or callback for the -broadcaster- side to know if the scanning side has entered its region or received its beacon? Something similar to "didEnterRegion", but for the broadcaster.
Thanks.
Simple answer - no.
Not so simple answer - clients don't connect to the "broadcaster", they just listen for advertisements, so there is no way for "broadcasters" to identify who has "heard" them.
Vladimir's answer is correct. However, you can set up your "broadcaster" (advertiser, in BLE terms) to also listen for other BLE devices that are advertising services, or sending out iBeacon broadcasts.
Then you would set up the remote receiving iOS app to execute special code when it gets a didEnterRegion call. That code could start advertising a pre-defined BLE service that your "broadcaster" is already listening for, and the two devices could then enter into a 2-way BLE conversation.
More simply, your receiver could simply start sending it's own beacon signal when it gets a didEnterRegion message as a result of detecting the "broadcaster"'s beacon signal.
You can do this is you just use CoreBluetooth CBCentral and CBPeripheral rather than trying to be an iBeacon (which encourages non-connectability).
While there is no standard way for a broadcaster or peripheral to automatically know who's found it you can do this by having an service and characteristic on your iOS peripheral. You could have your central scan for a particular UUID and when it finds it, have it connect and write an attribute, and then disconnect. This would give your peripheral information about who saw it.
This avoids the issue where you try to toggle between one device being a broadcaster and a central, since you can't be both of them at the same time.

window API for wireless mouse and keyboard

Is there any window API to catch the signals sent by the wireless mouse and keyboard ?
How far i know signals from this wireless device are always sent if it is connected but for the cabled mouse/keyboard , when we are moving the device only for that time signals are being sent ..Please correct me if i am wrong ..
If above is the case then please let me know any API to catch the signals sent by the wireless mouse/keyboard ?
Is there any window API
The Windows API (which is a user-mode API) doesn't care what kind of mouse you have: serial port, USB, wireless...
The mouse hardware connection is handled in the kernel, by a device driver.

why libpcap cannot capture outbound 802.11 beacons?

I am writing my own program, which will be running on a 802.11 AP, to capture all the outgoing beacons on the AP. But I just noticed I cannot do it with the current libpcap: the program couldn't capture any outbound beacons. I've also tried Wireshark which gave the same result.
My questions are:
Can anyone shed some lights on the causes of what I saw?
Is there any user space method that I can capture the outbound beacons of a 802.11 AP on that specific AP (rather than capturing on other PCs)? It is better for me if I can do this without hacking into the wireless driver.
I am using Ubuntu 10.04 as the OS, Madwifi as the wireless driver.
Thanks, folks.
I would guess that the WiFi chip is generating the beacons autonomously
so they never pass the driver-chip interface where libpcap intercepts
packets. You'll probably need a second radio to be able to capture the
beacons from the air (when the primary radio is busy sending a beacon
the receiver is turned off so it can't hear what it is transmitting).
You can Capture those packets(Beacon ,Acknowledgement,etc) in wireshark
all you need to do is following :
go to capture menu
after selecting your interface go to option
select the per packet information option in link layer type of your interface
press start

Resources