0
當我們想主要和次要的這個代碼,我們在這兩個弄空,但在日誌中我們得到的值:Altbeacon顯示主要和次要
,當我們想主要和次要使用此代碼,我們得到空在這兩個,但在日誌中我們得到的值:
Beacon firstBeacon = beacons.iterator().next();
Log.i(TAG,"The first beacon " + firstBeacon.toString() + " is about " + firstBeacon.getDistance() + " meters away.");
Log.i(TAG, "The first beacon I see has minor id "+beacons.iterator().next().getId3());
Log.i(TAG, "The first beacon I see has major id "+beacons.iterator().next().getId2());
String minor = beacons.iterator().next().getId3();
String major = beacons.iterator().next().getId2();
這應該工作。 – davidgyoung
不工作,我們得到null :( – user14492
做過同樣的事情嗎? –