-
-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Since from android 8 and above , android restricts to share the deviceAddress through wifi-direct . Connect() in wifi p2p is failing to connect since the argument to pass inside connect() is deviceAddress . Could you please help me with this @guptaamol @viniciuscb @qalqi @tyanbiao @seba9999 @kirillzyusko ?
const newSubscription = subscribeOnPeersUpdates(({ devices }) => {
if (devices && devices.length > 0) {
addLog(`New devices found: ${devices.length}`);
devices.forEach((device, index) => {
addLog(`Device ${index + 1}: ${device.deviceName || device.deviceAddress || 'Unknown'}`);
connect(device.deviceName).then(() => {
addLog(`successfully connected to ${device.deviceName}`);
}).catch((err) => {
addLog(`something gone wrong ${err}`);
});
});
} else {
addLog('No devices found');
}
});
// Store subscription to clean it up later
setSubscription(newSubscription);
};
From the above code i'm trying to connect the devices discovered through wifi-direct using deviceName which is wrong . i know that . From the documentation you provided tells to use DeviceAddress to connect which android restricts now . Then how to connect to discovered peers @kirillzyusko ?
Metadata
Metadata
Assignees
Labels
No labels