@Override public void onConnectionLost(PHAccessPoint accessPoint) { Log.v(TAG, "onConnectionLost : " + accessPoint.getIpAddress()); if (!phHueSDK.getDisconnectedAccessPoint().contains(accessPoint)) { phHueSDK.getDisconnectedAccessPoint().add(accessPoint); } }
@Override public void onAuthenticationRequired(PHAccessPoint accessPoint) { Log.w(TAG, "Authentication Required."); phHueSDK.startPushlinkAuthentication(accessPoint); Log.w(TAG, "Access Point IP addr: " + accessPoint.getIpAddress()); Log.w(TAG, "Access Point MAC addr: " + accessPoint.getMacAddress()); Log.w(TAG, "Access Point key: " + accessPoint.getUsername()); }
/** * Get a View that displays the data at the specified position in the data set. * * @param position The row index. * @param convertView The row view. * @param parent The view group. * @return A View corresponding to the data at the specified position. */ public View getView(final int position, View convertView, ViewGroup parent) { BridgeListItem item; if (convertView == null) { convertView = mInflater.inflate(R.layout.selectbridge_item, null); item = new BridgeListItem(); item.bridgeMac = (TextView) convertView.findViewById(R.id.bridge_mac); item.bridgeIp = (TextView) convertView.findViewById(R.id.bridge_ip); convertView.setTag(item); } else { item = (BridgeListItem) convertView.getTag(); } PHAccessPoint accessPoint = accessPoints.get(position); item.bridgeIp.setTextColor(Color.BLACK); item.bridgeIp.setText(accessPoint.getIpAddress()); item.bridgeMac.setTextColor(Color.DKGRAY); item.bridgeMac.setText(accessPoint.getMacAddress()); return convertView; }