Hi,
First of all thank you for the airport example, it helped. I have a question regarding ListView, I don’t get any errors but whenever I run the app it gives me an error saying “The app has stopped”.
Following is the Listview section I am trying to achieve.
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
textViewObj = (TextView) findViewById(txt1);
lst1= (ListView)findViewById(R.id.lst1);
beaconManager = new BeaconManager(this);
beaconManager.setRangingListener(new BeaconManager.RangingListener() {
@Override
public void onBeaconsDiscovered(Region region, List<Beacon> list) {
if (!list.isEmpty()) {
Beacon nearestBeacon = list.get(0);
List<String> places = placesNearBeacon(nearestBeacon);
ArrayAdapter<String> adapter1 = new ArrayAdapter<String>(getBaseContext(), R.layout.activity_main, places);
lst1.setAdapter(adapter1);
// Log.d("Airport", "Nearest places: " + places);
}
}
});
region = new Region("ranged region", UUID.fromString("XXXXX-XXXX-XXXXXX-XXXXXXXXXXX"), null, null);
}