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

Callback for service ready #12

Closed nitrag closed 8 years ago

nitrag commented 8 years ago

First off, this is a sweet module! Thanks so much for putting it together.

Right now, I have a setTimeout to wait 8 seconds before setting up the event listeners. I need to start advertising ASAP so I can't rely on a button click. I'm not sure if this is long enough and I certainly would like to shorten it. Is there anyway you can add a "onReady" eventListener when the module is ready? This way there is no guesswork on when it is ok to go ahead and setup the event listeners.

Thanks!

nitrag commented 8 years ago

Couldn't get a callback setup because it seems that onIBeaconServiceConnect fires twice.

My Pull Request: https://github.com/jamesfalkner/liferay-android-beacons/pull/13

Dist (zip): https://github.com/nitrag/liferay-android-beacons/blob/master/dist/com.liferay.beacons-android-0.4.zip

jamesfalkner commented 8 years ago

Committed (along with new binary). Thanks!