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

adding support to check when the module/service is ready #13

Closed nitrag closed 8 years ago

nitrag commented 8 years ago

Instead of guessing when the module/service is ready, we can check this way and get the listeners setup ASAP.

var handle;
handle = setInterval(function(){
    if(!TiBeacons.isReady())
        return;

    Ti.API.info("Okay! Module is ready!");  
    clearInterval(handle);
    handle = null;

    //setup your event listeners here
}, 1000);
appinlet commented 8 years ago

Noob question, is there a built version of the module with this functionality in existence?

nitrag commented 8 years ago

Yes, on my fork.

https://github.com/nitrag/liferay-android-beacons/blob/9e7da951c100a2f28f044ba663d1b6651cd517d5/dist/com.liferay.beacons-android-0.4.zip

On Tue, Nov 10, 2015 at 3:08 PM, RBAtkins0n notifications@github.com wrote:

Noob question, is there a built version of the module with this functionality in existence?

— Reply to this email directly or view it on GitHub https://github.com/jamesfalkner/liferay-android-beacons/pull/13#issuecomment-155551264 .

appinlet commented 8 years ago

Awesome, thanks for the great work!

jamesfalkner commented 8 years ago

Thanks for the contribution!