Hi
I’m following the example given on the Estimotes developers doc. Code is as follows
package e.user.estimotetelemetry;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import com.estimote.coresdk.recognition.packets.EstimoteTelemetry;
import com.estimote.coresdk.service.BeaconManager;
import java.util.List;
public class MainActivity extends AppCompatActivity {
private BeaconManager beaconManager;
private BeaconManager bm;
private String scanId;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
beaconManager = new BeaconManager(this);
/* bm = new BeaconManager(getApplicationContext());
bm.setNearableListener(new BeaconManager.NearableListener() {
@Override
public void onNearablesDiscovered(List<Nearable> nearables) {
scanId= beaconManager.startTelemetryDiscovery();
}
}); */
beaconManager.setTelemetryListener(new BeaconManager.TelemetryListener() {
@Override
public void onTelemetriesFound(List<EstimoteTelemetry> telemetries) {
for (EstimoteTelemetry tlm : telemetries) {
Log.d("TELEMETRY", "beaconID: " + tlm.deviceId +
", temperature: " + tlm.temperature + " °C");
}
}
});
}
@Override protected void onStart() {
super.onStart();
beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
@Override
public void onServiceReady() {
// scanId = beaconManager.startTelemetryDiscovery(); // This line shows up an incompatibility error as : incompatible types required java.lang.string found void
}
});
}
@Override
protected void onStop() {
super.onStop();
// beaconManager.stopTelemetryDiscovery(scanId); //incompatible types required java.lang.string found void
}
}
It’ll be great if someone could help with this. Thanks in advance!