Regarding Temperature

hi,

i have estimote stickers, i downloaded your default demo app from google play. As estimote stickers are able to detect temperature (absolute or relative doesn’t matter). Can any how i can implement that in my code so that i can also get same in my app. If it is possible then, How?. I m using Android Studio.

Thanks…

Yup, you can (:

First, follow the “nearables discovery” quick start:

Then, once you have the List of Nearable objects, the temperature is right there: the temperature property.

This is actually how the NearableDemo works, so you can probably borrow some code from there (:

1 Like

Thanks for assistance. Actually I am very bad at coding i am trying my best to learn it.

Is it possible to read the same data (temperature) from particular sticker with some specific uuid.

Try this:

@Override public void onNearablesDiscovered(List<Nearable> nearables) {
    for (Nearable n : nearables) {
        if (n.identifier.equals("xxx")) {
            Log.d(TAG, "Temperature: " + n.temperature);
        }
    }
}
1 Like

hi heypiotr,

Can you please help me with this…

Actually i want to discovery two sticker with specific UUId and then I have take the temperature of those two and calculate the difference . If the difference is more than 10 the i have return one TEXTVIEW message saying “danger”. I seriously don’t know how to implement. If you have time please help me.

As i have mentioned that i m very weak in coding and I tried to study your Demo codes even what you suggested in the previous post. But i m very confused. I am unable to understand how to achieve that even i tried what you said but don’t know where to put the code and how to do it…

If possible please help me. I know i m asking to much. If you don’t have time please ignore. Sorry if I am asking you to much.

thanks

Can you help… What is problem with following code… It always force stopped when ever i run the app .

public class MainActivity extends AppCompatActivity {

private BeaconManager beaconManager = new BeaconManager(this);
private String scanId;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
   // Androidapp app = (Androidapp) getApplication();
   // beaconManager = app.getBeaconManager();
    beaconManager.setNearableListener(new BeaconManager.NearableListener() {
        @Override
        public void onNearablesDiscovered(List<Nearable> nearables) {
            if (nearables.size() != 0) {
                for(Nearable n: nearables)
                {
                    TextView powerView = (TextView) findViewById(R.id.power);
                    powerView.setText("" + n.temperature);
                }
            }


        }
    });

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
    // Inflate the menu; this adds items to the action bar if it is present.
    getMenuInflater().inflate(R.menu.menu_main, menu);
    return true;
}

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // Handle action bar item clicks here. The action bar will
    // automatically handle clicks on the Home/Up button, so long
    // as you specify a parent activity in AndroidManifest.xml.
    int id = item.getItemId();

    //noinspection SimplifiableIfStatement
    if (id == R.id.action_settings) {
        return true;
    }

    return super.onOptionsItemSelected(item);
}


@Override
protected void onStart() {
    super.onStart();
    beaconManager.connect(new BeaconManager.ServiceReadyCallback() {
        @Override public void onServiceReady() {
            scanId = beaconManager.startNearableDiscovery();

        }
    });

}
@Override
protected void onStop() {
    super.onStop();
    beaconManager.stopNearableDiscovery(scanId);

}
@Override
protected void onDestroy() {
    super.onDestroy();

    beaconManager.disconnect();
}

}

What exception you are seeing?

Thanks I figure it out … thanks for help

I just bought Estimote-Eddystone. I want to develop an app which can detect temperature. Is that possible from Eddystone. I am developing an android app. Is that possible through your SDK or I have to use something else. Please suggest on the same.

Please refer to Eddystone quickstart.

how can i select a beacon with specific uuid. it should not detect the other beacon.
… and at last i want to take temperature of that specific beacon… can you help me with this. Just guide me how to do it…

thanks