Bonjour over bluetooth WITHOUT Gamekit ?

Just announce the service, just like tc. has said below: self.netService = [[[NSNetService alloc] initWithDomain:@”” type:@”_http._tcp” name:@”” port:8080] autorelease]; [self.netService publish]; With iOS5, however, let’s-call-it “Bluetooth Bonjour” is disabled by default, so you have to use the C API declared in <dns_sd.h>. DNSServiceRef serviceRef; DNSServiceRegister(&serviceRef, // sdRef kDNSServiceFlagsIncludeP2P, // interfaceIndex 0, // flags NULL, // … Read more

Android Bluetooth Example [closed]

I have also used following link as others have suggested you for bluetooth communication. http://developer.android.com/guide/topics/connectivity/bluetooth.html The thing is all you need is a class BluetoothChatService.java this class has following threads: Accept Connecting Connected Now when you call start function of the BluetoothChatService like: mChatService.start(); It starts accept thread which means it will start looking for … Read more

How can I avoid or dismiss Android’s Bluetooth pairing notification when I am doing programmatic pairing?

Try setting the confirmation first in the PAIRING_REQUEST BluetoothDevice device = intent.getParcelableExtra(“android.bluetooth.device.extra.DEVICE”); device.getClass().getMethod(“setPairingConfirmation”, boolean.class).invoke(device, true); device.getClass().getMethod(“cancelPairingUserInput”).invoke(device); This worked for me between two Android devices using RFCOMM but I’m not entering any PINs

Since marshmallow update Bluetooth discovery using BluetoothAdapter.getDefaultAdapter().startDiscovery(); is broken

Bluetooth Adapter has been change in Android 6.0 You need to set the permission ACCESS_FINE_LOCATION or ACCESS_COARSE_LOCATION permission and need to use BluetoothLeScanner.startScan() method to start the scan. Below is the description from change logs: To provide users with greater data protection, in Android 6.0, Android removes programmatic access to the device’s local hardware identifier … Read more

How many devices we can pair via Bluetooth of BLE to Android?

A search of the Android Bluetooth Firmware source shows the following: Max concurrent active synchronous connections (BTA_GATTC_CONN_MAX): 4 on Android 4.3 7 on Android 4.4+ Max concurrent active notifications (BTA_GATTC_NOTIF_REG_MAX): 4 on Android 4.3 7 on Android 4.4 15 on Android 5.0+ As a comparison my experience with iOS is that 8 devices can be … Read more