In the ConnectionDialogFragment device list Socket#getHostName() should be used instead of Socket#getHostAddress().
NOTE: Socket#getHostAddress()is a network operation, thus it shouldn't be done on the UI thread.
Two solutions:
- Return an
Object {name, address} in Beacon
- Create an
AsyncTask<Socket, Void, Name> to fetch the name
In the
ConnectionDialogFragmentdevice listSocket#getHostName()should be used instead ofSocket#getHostAddress().NOTE:
Socket#getHostAddress()is a network operation, thus it shouldn't be done on the UI thread.Two solutions:
Object {name, address}inBeaconAsyncTask<Socket, Void, Name>to fetch the name