Esri's Geotrigger Service is replacing Geoloqi! Learn More | FAQ

The Titanium module is no longer supported. Please see our blog post for more info.

Geoloqi Titanium Module

Start developing location aware apps with Titanium.

Getting Started Download Module

Introduction

Titanium from Appcelerator allows developers to create native iOS and Android applications from a single JavaScript-based SDK. This enables you to build a single application in JavaScript, which is then compiled into native code, with the same look and feel as a native application.

Geoloqi has partnered with Appcelerator to provide a module for Titanium, enabling developers to quickly create rich, location aware applications.

Use Cases

  • Easily send messages or offers to users when they arrive at certain areas
  • Create a fitness tracking app without needing to build your own backend, or learn native phone development
  • Quickly track whether people are using your app more in your stores or at home

Creating an account

Click here to see the Geoloqi pricing, and choose the plan that works best for you.

After you create an account, you are ready to build applications. There are no additional fees or monthly payments required for the Titanium module.

Installation

The Geoloqi module is available from Github, and acts like a standard Titanium module. You can read about how to install Titanium Modules here.

First, configure the application by adding a config.js in your Resources directory:

exports = {
  clientId: "get your clientId at http://developers.geoloqi.com",
  clientSecret: "get your clientSecret at http://developers.geoloqi.com"
}

Now you need to initialize the Geoloqi module, by adding it to your Resources/app.js file:

// import the Geolqoi Module
var geoloqi = require('ti.geoloqi');
 
geoloqi.init({
  clientId: Config.clientId,
  clientSecret: Config.clientSecret,
  trackingProfile: "PASSIVE"
},{
  onSuccess: function(){
    // You can now use all methods of the geoloqi module.
    Ti.API.info("Tracking Profile: " + geoloqi.tracker.getProfile());
    Ti.API.info("Access Token: " + geoloqi.session.getAccessToken());
    Ti.API.info("User ID: " + geoloqi.session.getUserId());
    Ti.API.info("Username: " + geoloqi.session.getUsername());
    Ti.API.info("Anonymous User?: " + geoloqi.session.isAnonymous());
 
    // This will setup push notifications for the device    
    Ti.Network.registerForPushNotifications({
      types:[
        Titanium.Network.NOTIFICATION_TYPE_ALERT
      ],
      callback: function(data){
        geoloqi.iOS.handlePush(data);
      },
      success:function(data){
        geoloqi.iOS.registerDeviceToken(data.deviceToken);
      },
      error: function(data){
        Ti.API.error("Could Not Register For Push" + data.error + data.type);
      }
    });
  },
  onFailure: function(){
    Ti.API.error("Geoloqi Config Failed");
  }
});

That's it! Your application should now be sending location updates to Geoloqi in battery safe mode.

Examples

Geoloqi has developed a demo app called Dino Deals! You can get the source code on Github.