0

I am adding the Estimote SDK into an Android app. I am following Estimote's guide on GitHub available at https://github.com/Estimote/Android-SDK.

I am having trouble with this line of code and am getting an error that says "cannot resolve symbol 'context'".

private BeaconManager beaconManager = new BeaconManager(context);

Any ideas what I need to do to resolve that? It does not seem to be addressed in the Estimote guide.

Thank you!

Brandon
  • 1,701
  • 3
  • 16
  • 26
  • 1
    That `context` is the root context of your app. If you have this code inside an `Activity` just change `context` for `this`. – Héctor Jan 23 '15 at 07:46

1 Answers1

1

This is Android's Context class. If you are inside an Activity then you can just call getContext() to obtain it.

See SDK demos how to do it. In particular ListBeaconsActivity.

Wiktor Gworek
  • 486
  • 3
  • 7
  • Thanks! I'm definitely moving along here, but now I'm having some trouble with region monitoring. Please feel free to take a look at my question here: http://stackoverflow.com/questions/28121038/android-estimote-region-monitoring. Thank you! – Brandon Jan 24 '15 at 01:45