Hello
I’ve allready made my first Android App using Proximity Beacons. Now I tried to make one using nearables. I used the following Code to set this up. Allthow i did not get any errors, i do also not receive any detected nearables in my Log.
Is there a Problem with my Code or could it be something with the devices? If needed I can Post More Information. I am Using an LG-H815(Android 6.0, API 23)
Thank you for any Inputs or suggestions
beaconManager = new BeaconManager(this);
beaconManager.setNearableListener(new BeaconManager.NearableListener() {
@Override
public void onNearablesDiscovered(List<Nearable> nearables) {
Log.d("app", nearables.toString());
Log.d("app", String.valueOf(nearables.size()));
for (Nearable nearable : nearables) {
Log.d("app", nearable.identifier);
TextView editText = (TextView) findViewById(R.id.mountain2);
editText.setText(nearables.toString());
}
}
});
beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
@Override
public void onServiceReady() {
beaconManager.startNearableDiscovery();
}
});