I got my Estimote beacons up and running, and would like to connect my device to a local database which I would store my Beacons, together with a list of Facilities which I would couple with them. I have looked up similar questions, but haven't found any good examples or answers. Please help me push me in the right direction!
Asked
Active
Viewed 422 times
-1
-
Just a question. What do you want to store in the database? Cause Estimote beacons has an id which you can store in the database. Do you need anything else in there? Define list of Facilities? – Kevin van Mierlo Oct 15 '14 at 12:01
-
So far I have created the database with tables TABLE_BEACONS and TABLE_FACILITIES. TABLE_BEACONS has columns id (PK), uuid, major and minor. TABLE_FACILITIES has columns id (PK), description and bid (beacon id). I'm using an INNER JOIN to collect the information in the database for all Facilities for a beacon with a specific id. So I would get all Facilities returned in a list with their bid's = 1, if beacon with id = 1 exists. Most important part being that the Beacons in my model scheme are mockups (I've named them MyBeacon), and so are not really beacons as in the Android SDK from Estimote) – Marvin Effing Oct 15 '14 at 14:22
-
So I would need to find a way to convert the mockup beacons to 'real' beacon classes. – Marvin Effing Oct 15 '14 at 14:25
-
Okay so what is the question? Do you want to know how to get the id from a beacon? Cause it seems you already know how to put it in the database. Or am I missing something? – Kevin van Mierlo Oct 15 '14 at 15:17
-
Right now what I need to know is how to get from a single Beacon from ListBeaconsActivity (see demo set of Estimote) to i.e. FacilityDetailFragment showing that Beacon's linked Facilities. The rest I have already figured out myself. – Marvin Effing Oct 16 '14 at 07:47
-
If you found the answer to the question please provide an answer yourself and accept it. Don't append "answered" to your question title, an accepted answer it's what you're looking to indicate the question is closed. – user Oct 16 '14 at 19:33
1 Answers
1
Use ActiveAndroid or greenDAO to create your database model. Then pair those together - beacons and facilities they are linked with. Using Estimote SDK demo register in BeaconManager for beacon in range situation. Then decode beacons parameters and query facility table for object connected with that beacon.

dominik4142
- 556
- 3
- 14
-
Thanks, but I already got it fixed. I will close this question soon. – Marvin Effing Oct 16 '14 at 14:08