I'd like to create a connection between two or more smartwatches without their handheld devices.
I made this test to check the support
FeatureInfo[] features = getPackageManager().getSystemAvailableFeatures();
for (FeatureInfo info : features) {
if (info != null && info.name != null && info.name.equalsIgnoreCase("android.hardware.wifi.direct")) {
Log.i("wear main", "wifi direct supported");
return;
}
}
Log.i("wear main", "wifi direct not supported");
Since the following listener can tell if the service is available, I also made this test
WifiP2pManager mManager = (WifiP2pManager) getSystemService(Context.WIFI_P2P_SERVICE);
Channel mChannel = mManager.initialize(this, getMainLooper(), null);
mManager.discoverPeers(mChannel, new WifiP2pManager.ActionListener() {
@Override
public void onSuccess() {
Log.i("wear main", "wifi direct supported");
return;
}
@Override
public void onFailure(int reasonCode) {
Log.i("wear main", "wifi direct not supported");
return;
}
});
I can only see that it's not supported (using sony smartwatch 3). Is it possible to use Wifi direct in android wear?