Estimote / Android-Fleet-Management-SDK

Estimote Fleet Management SDK for Android
https://developer.estimote.com
MIT License
836 stars 451 forks source link

Name info missing in NearableInfo class #156

Closed arslanmustafa closed 8 years ago

arslanmustafa commented 8 years ago

I am trying to connect to the Estimote cloud to fetch information about a discovered Nearable. My observation is that the name field comes back as null (example output below when I print it using the toString() method of the NearableInfo class):

NearableInfo{identifier='0bd6d94bf879b3fb', name='null', color=Mint Cocktail, type=Dog}

This observation is made using the Android SDK v 0.10.5

pawelDylag commented 8 years ago

Hello @arslanmustafa !

Sorry for the delay. I suppose you were asking about using method fetchNearableDetails - if so, then the only values returned are: type, id, color and category. Name is not included in public data.
If you want to get Nearable name - the only way to do that is to connect to it, and to use NearableInfo class then.

Let me know if that helps!

arslanmustafa commented 8 years ago

Hi Pawel,

Yes, I was indeed asking about the method you mentioned. I appreciate your clarification though my use case required to get the name as soon as the sticker is detected (without the additional connection overhead in addition to the cloud query), so connecting to it will not really help.

Do you mind sharing the rationale behind not making name available as public data?

pawelDylag commented 8 years ago

The reasoning behind this is privacy. For example, the difference between "id" and "name" is that name is publicly visible - in that way, when you tag your beacon "MyCamera" or "SuperSecretThing", then everybody else might be able to see what it is called. Some people don't want such behaviour, so here in Estimote we decided to hide "name" from public endpoint.

Have a nice day, @arslanmustafa !

arslanmustafa commented 8 years ago

Thank you for the insight @pawelDylag , this makes sense. Can you explain if privacy can be provided in the following scenario?

The Estimote Cloud returns the information if you supply the correct API-key, which is generated when you log in to your Estimote Cloud account. Let us say that a developer bought 100 stickers and wants to create an app that display's a user specified name for the sticker (like "MyCamera"). If name was publicly available, I think all users who install the developer's app would be able to see each other's items, since the query to the cloud would be made with the developer's API key (common to the app users). Is my understanding correct? Can you have user-level privacy if each user purchases the stickers themselves (instead of the developer doing so) and create an Estimote Cloud account?

pawelDylag commented 8 years ago

As for your use-case with 100 beacons - yes, they all would see each other sticker names. Your understanding is correct indeed. The only way to see your sticker private name, is to have an cloud account, with this sticker assigned to it. There is no possibility to log in a different user through our SDK for now. If you need to scan data of private stickers, the only idea that comes to my mind is to try our OAuth. Here, some docs on it, maybe you will figure something out with it - http://developer.estimote.com/cloud/oauth/ :)

arslanmustafa commented 8 years ago

I will check it out, thanks a lot!