jamesfalkner / liferay-android-beacons

A Titanium Appcelerator module to interact with iBeacons via the Radius Networks' iBeacon native android library
Other
46 stars 27 forks source link

Does this module is a multiple method of recognizing ? #10

Closed elmar28 closed 9 years ago

elmar28 commented 9 years ago

How can I recognize the two beacons , or this module is compatible ?

jamesfalkner commented 9 years ago

What do you mean "recognize" ? You can turn on ranging for a region, and you will get callbacks for all beacons within that region.

You can also monitor for multiple regions at the same time using different uuid/major/minor combinations.

elmar28 commented 9 years ago

Do startMonitoringForRegion you need to call to the specified things of major if the uuid is acquired by changing the major / minor in the same ?

You are looking at the response , but if major is not specified other than the first one that is acquired , you can not get a response .

Or UUID can be acquired output to locate the same on the automatic ?

elmar28 commented 9 years ago

It was my mistake . major / minor had been able to get . Is there a way to take the number of beacon that is monitoring ?

jamesfalkner commented 9 years ago

Each beacon only transmits 3 identifiers: UUID, major, and minor. beacons themselves cannot monitor other beacons. Only bluetooth receivers (e.g. smartphones) can perform the monitoring.

During ranging, your callback will get called once for each beacon that it "sees". Each beacon will have a uuid, major, and minor value (and an identifier string which tells you in which region the beacon is. There are a few other items passed, but not important for identification of the beacon.

Some other libraries might call your callback once, and pass a complete array of "seen" beacons. But this one does not do that.

Hope this helps!

elmar28 commented 9 years ago

All right. By creating a monitoring process with self-made , the number of beacon to determine .

Thank you

jamesfalkner commented 9 years ago

So you want to know how many beacons are "seen" during ranging?

Not currently possible with this library but I can add this in if this is what you're looking for.

elmar28 commented 9 years ago

Is really !

I want to determine the beacon in the nearest in the beacon you are monitoring .

{ "type": "beaconProximity", "source": { "bubbleParent": true, "apiName": "Ti.Module", "invocationAPIs": [], "_events": { "beaconProximity": {}, "enteredRegion": {}, "exitedRegion": {} } } , "proximity": "far", "minor": 5, "power": - 59, "rssi": - 90, "uuid": "000000-0000-0000-0000-000000000000", "accuracy": 23.44427636162588, "identifier": "FOO", "major": 5, "bubbles": false, "cancelBubble": false }

The current response .

In this response Now , of you are monitoring , and what number of beacon of the It is want is determined to 'key'

And get to do this , I can hold as an array the response of the acquired beacon app

jamesfalkner commented 9 years ago

Ok I will add another event which will give you all beacons in an array. But you will still need to calculate the distance to each beacon because this is not something that the OS calculates.

elmar28 commented 9 years ago

Thanks you.

state you do not know some are monitoring the reaction was not when the beacon is okay if it is eliminated.

Calculation processing of distance I can make on your own

jamesfalkner commented 9 years ago

I'd rather leave in the unknown proximities, and let the mobile OS determine when to drop it from the list :) So if you want to eliminate them, just strip them out if they are unknown. I'll publish an update in about an hour after my android tablet charges enough to test this :)

elmar28 commented 9 years ago

So I 'm get to correspond immediately !

Thank you very much !

jamesfalkner commented 9 years ago

Ok I've added this and re-generated the binary release - 0.3 in the dist directory. Let me know if it works for you! You'll need to listen for the beaconRanges event (and not the beaconProximity event).

elmar28 commented 9 years ago

Thanks you. I 'll try tomorrow morning . When you work, you will be reported .

elmar28 commented 9 years ago

Tried . I was able to confirm the operation . Thank you very much .

jamesfalkner commented 9 years ago

Hurray! Thanks for testing so quickly..