में ब्लूटूथ से जुड़े उपकरण का MAC पता पाने के लिए मैं एंड्रॉयड में ब्लूटूथ के माध्यम से एक छवि भेज रहा हूँ और करने के लिए जो छवि भेजा जा रहा है डिवाइस के मैक पता लाने के लिए चाहते हैं।कैसे एंड्रॉयड
कृपया मेरे कोड के नीचे मिला।
private void bluetoothadd(){
BluetoothAdapter mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter == null) {
// Device does not support Bluetooth
Log.e("Bluetooth ","not found");
}
if (!mBluetoothAdapter.isEnabled()) {
Intent enableBtIntent = new Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE);
startActivity(enableBtIntent);
Set<BluetoothDevice> pairedDevices = mBluetoothAdapter.getBondedDevices();
// If there are paired devices
if (pairedDevices.size() > 0) {
// Loop through paired devices
for (BluetoothDevice device : pairedDevices) {
Log.e("Mac Addressess","are: "+mBluetoothAdapter.getRemoteDevice(device.getAddress()));
}
}
}
}
मुझे सभी जोड़े गए डिवाइस के मैक पते मिल रहे हैं। मैं एक डिवाइस का मैक पता चाहता हूं कि केवल किस डेटा को प्रसारित किया जा रहा हो।
आप पते, जब अन्य डिवाइस उपयोगकर्ता के उपकरण से जुड़ा है, या यहाँ तक कि इससे पहले कि कनेक्शन स्थापित हो जाने (डिस्कवरी चरण) लगाना चाहते हैं .. ??? – Shiva
मुझे कनेक्ट होने पर किसी अन्य डिवाइस का पता चाहिए और मैं मैक पता प्राप्त कर सकता हूं कि डेटा किस डिवाइस पर भेजा जा रहा है। –
जांच निम्न लिंक http://stackoverflow.com/questions/10795424/how-to-get-the-bluetooth-devices-as-a-list http://stackoverflow.com/questions/16471204/खोज-ब्लूटूथ-डिवाइस-सूचीदृश्य-नहीं-नहीं-अपडेट-अपडेट –