Geoloqi SDK
  • Using the SDK? Ask questions and share info here.
  • 16 Comments sorted by
  • I was able to figure it out.  1) add the library to your project 2) copy JSON files to your project 3) set the Library and Header search paths (see the sample) in build settings 4) set other linker flags (see the sample) 5) under build phases and compile sources add JSONKit.m and add the following compiler flag: -fno-objc-arc 6) make sure the Geoloqui libraries are not listed in Link Binary with Libraries.
  • i have downloaded the project from here https://github.com/geoloqi/Geoloqi-Android-SDK? but i cannot successfully setup it in my Eclipse, please any help
  • "After pulling down the source you can easily reference an Android Library project from Eclipse"
    => But how can I pull down the source?
  • Good question! The Android SDK used to be an Android Library Project, but now it's just a .jar library that you can include in your project! We've updated the Sample-Android-App documentation to reflect these changes and walk you through the process a little more:

    https://github.com/geoloqi/Sample-Android-App

    Let us know if that does not resolve your question!
  • To use service, I need to define 2 constants: LQ_SDK_ID and LQ_SDK_SECRET.
    I can define any value I want, right?
    If not, how can I get those values?
  • Not just any random value but replace LQ_SDK_ID and 
    LQ_SDK_SECRET with the value of API Key and API Secret of "your" application. If you haven't yet created any application then you can create one from this page: http://developers.geoloqi.com/account/applications/new otherwise click on 'Your Account' text on the top right corner and click on 'Applications'. 

    Once you have SDK ID and SECRET, open the sample android application locate ConstantSample.java under com.geoloqi.android.sample package, update it with your ID and Secret and rename this file to Constant.java
  • That's correct! You need to create a new "Application" which will grant you the Application ID and Secret tokens. You'll use those to authenticate your application.
  • Hi,

    I want to create an android application which has function to store user location and update his/her location when it changes.

    1. Do I need to create account for each user who uses my application?
    2. How can I get user location?
    3. I register a LQBroadcastReceiver to handle action "com.geoloqi.android.sdk.action.LOCATION_CHANGED". It means that everytime when user location changes, my receiver method will be called, right?

    Thanks,
  • 1. Yes, you'll need to create a new account for each individual. The location service will automatically create a new Anonymous user account when it starts up on a device.

    2. If you start the location service with the default action it will automatically start receiving location updates and pushing them to the server. You can call the location/history API endpoint to get a user's past location details. See the making-api-requests documentation for more info.

    3. Correct. If you extend LQBroadcastReceiver and register an IntentReceiver with the location changed action, then the OnLocationChanged abstract method will be called whenever the user's location changes.

    Please see the Android sample application for some good example code: https://github.com/geoloqi/Geoloqi-Android-SDK
  • iOS SDK.
    I need a quick help
    LQSession LQTracker undeclared are undeclared even though I follow the instuctions
    the linker flags are set as on the screenshot or the sample app...any ideas?
    I also had to add JSONKit to my project just to make it compile with the libraries.. the description did not mention anything about that.. am I missing anything?
  • Try adding the folder where you put the *.h files into the "Library Search Paths" config item. It might need to be something like "../GeoloqiSDK" depending on where you put the header files in your project.
  • Hi,

    When I develop android application using Geoloqi, I create 1 Geoloqi account for each user who uses my application.
    When creating, it doesn't require password.
    But if I create Geoloqi user successful, how can I login new account without password?

    If the password is required, please tell me how I can create password for the Geoloqi account by Android application?
  • There are two ways you can create user accounts.

    user/create_anon will create an anonymous account and return an OAuth token that the app can store to automatically log the user back in. This method exists in case you don't expect the user to log in on a website, or if you are tying the Geoloqi user accounts to your own user database.

    user/create will allow you to specify an email address and password when creating an account. This method is for when you want to let Geoloqi handle your user management. If you don't specify a password, your users can visit geoloqi.com and click "reset password" to choose their own password.

    Hopefully this helps answer your questions! Thanks!


  • can you safely turn on and off the LQTracker?

    [LQTracker configureAnonymousUserAccountWithUserInfo:nil profile:LQTrackerProfileOff]; to stop

    and 

    [LQTracker configureAnonymousUserAccountWithUserInfo:gDict profile:LQTrackerProfileRealtime]; to start would make it work right?

  • That should work, although a slightly cleaner way of doing it is this:

    [[LQTracker sharedTracker] setProfile:LQTrackerProfileOff]

       and

    [[LQTracker sharedTracker] setProfile:LQTrackerProfileRealtime]

    You can create an anonymous user account in your app delegate before-hand like this:

    if(![LQSession savedSession]) {








        [LQSession createAnonymousUserAccountWithUserInfo:nil completion:^(LQSession *session, NSError *error){
            // Save the session so it can be restored next time
            [LQSession setSavedSession:session];
        }];
    }


















  • Does this page
    (http://developers.geoloqi.com/ios/getting-started) describe all the
    adjustment we need to make in order to fully integrate the SDK with our
    app?



    I'm asking this because I figured it was necessary to add
    the location as the "required device capability" in order for sdk to
    run smoothly, which is not described in the above link... are there other key parameters we need to adjust? Right now when I use our demo app (integrated with Geoloqi SDK, running in our office) it seems like the SDK is continuously pulling the location while the tracker only uses the Geofences... both of them are set on passive mode and subscribed to the same set of layers...

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion