How to capture key events from bluetooth headset with android

Add a broadcast listener to MEDIA_BUTTON: <intent-filter android:priority=”<some number>”> <action android:name=”android.intent.action.MEDIA_BUTTON” /> </intent-filter> You should register your broadcast receiver inside your application (not in manifest file). Otherwise Google Music player will catch your broadcast and aboard it. Your IntentFilter priority should be higher that other media players priorities in your phone) Add android.permission.BLUETOOTH permission in … Read more

How to unpair bluetooth device using android 2.1 sdk

Here’s how you unpair/remove a bonded device call this method where macAddress is the string of the mac address of the device..i.e. “00:02:00:A3:03:05” IBluetooth ib =getIBluetooth(); ib.removeBond(macAddress); To get the IBluetooth Object you need to go through a couple of steps create a package in your project called android.bluetooth create two files, IBluetooth.aidl and IBluetoothCallback.aidl … Read more

Get MAC address of bluetooth low energy peripheral in iOS

CBPeripheral’s identifier property will serve your purpose, available from a still-unconnected device in CBCentralManager’s didDiscoverPeripheral delegate method: – (void)centralManager:(CBCentralManager *)central didDiscoverPeripheral:(CBPeripheral *)peripheral advertisementData:(NSDictionary *)advertisementData RSSI:(NSNumber *)RSSI CBPeripheral *peripheral … NSUUID* serverId = [peripheral identifier]; I have a half dozen LE devices I’m experimenting with, including multiple sets of identical devices. I just confirmed that across … Read more

Android 12 New Bluetooth Permissions

100% working solution : no need any 3rd party plugin manifest code: <!–BLUETOOTH PERMISSION–> <!– Request legacy Bluetooth permissions on older devices. –> <uses-permission android:name=”android.permission.BLUETOOTH” /> <uses-permission android:name=”android.permission.BLUETOOTH_ADMIN” /> <!– Needed only if your app looks for Bluetooth devices. If your app doesn’t use Bluetooth scan results to derive physical location information, you can strongly … Read more

How can an iPhone access another non-iPhone device over wireless or Bluetooth?

The only way to communicate with other Bluetooth devices via the External Accessory framework in iPhone OS 3.0 is if they are in the Made for iPod accessory program. Even though they communicate through standard Bluetooth connections, accessories need special hardware in order to process the data stream coming from the iPhone / iPod touch. … Read more