안녕하세요
공백 및 널 체크는 이렇게 하시면 될것 같습니다.
if(!device.getName().equalsIgnoreCase("") || device.getName() != null)
어댑터 안에 값과 받아온 디바이스 값을 중복체크 후 어댑터에 add 하시면 될 것 같습니다.
어댑터를 ArrayAdater<String> 컬렉션 객체로 만들어서 예시를 했습니다.
for(int i = 0; i < mNewDevicesArrayAdapter.getCount(); i++){
if (!mNewDevicesArrayAdapter.getItem(i).equalsIgnoreCase("비교할대상"){
mNewDevicesArrayAdapter.add(device.getName() + "\n" + device.getAddress());
}
}
수고하세요