BeaconScan.class
public void onBeaconServiceConnect() {
beaconManager.removeAllMonitorNotifiers();
beaconManager.addRangeNotifier(new RangeNotifier()
{
@Override
public void didRangeBeaconsInRegion(Collection <Beacon> beacons, Region region)
{
if (beacons.size() > 0)
{
Log.i(TAG, "The first beacon I see is about "+((Beacon)beacons.iterator().next()).getDistance()+" meters away.");
beaconList.clear();
for(Beacon beacon : beacons){
beaconList.add(beacon);
Identifier id2 = beacon.getId2();
Identifier id3 = beacon.getId3();
Log.i(TAG, "major:"+id2+"minor"+id3);
Intent intent = new Intent(BeaconScan.this, BeaconRequest.class);
intent.putExtra("beacon_major", id2);
intent.putExtra("beacon_minor",id3);
}
public class BeaconRequest extends AppCompatActivity {
int beacon_major,beacon_minor;
@Override
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.test);
Bundle extras = getIntent().getExtras();
beacon_major=extras.getInt("beacon_major");
Log.i("","beamajor"+beacon_major);
beacon_minor=extras.getInt("beacon_minor");
Log.i("","beaminor"+beacon_minor);
try{
WebSettings webSettings =
}
}
}
여기에서 id2, id3 (beacon_major,beacon_minor)를 서버에 저장하고 싶은데 volley나 httpconnection으로 가능할까요? 가능하면 예제추천 부탁드립니다...ㅠ