Developers 2017-03-28T16:56:11+00:00

Mobile Context SDK

Need to know when a user starts or ends a trip? Then look no further!

Our SDK integrates into your mobile app within minutes. It then operates in the background with minimal battery drain. And it notifies you on user location changes.

Why use this? Much less work than native APIs. Lower battery drain than OS standard. Cross-plattform compatibility. Less false positives. And it’s completely free to run on the first 10,000 devices.

public class MyApplication extends Application implements PredictIOListener,
   PredictIO.PIOActivationListener {

   @Override
   public void onCreate() {
       startPredictIO();
   }

   private void startPredictIO() {
       // Instantiate predict.io SDK 
       PredictIO predictIO = PredictIO.getInstance(getApplicationContext());
       predictIO.setAppOnCreate(this);
       // Set events listener
       predictIO.setListener(this);
       // Start tracking
       predictIO.start(this);
   }
extension MyLocationController: PredictIODelegate {
 func startPredictIO() {
   let predictIO = PredictIO.sharedInstance()
   predictIO?.delegate = self
   predictIO?.apiKey = API_KEY

   predictIO?.start(completionHandler: {
     error in
     
     if let error = error {
       print("Failed to start predict.io...")
     }
     else {
       print("Started predict.io...")
     }
  })
 }
}
function startPredictIOTracker() {
   cordova.exec(function successCallback() {
           alert(success);
       },
       function errorCallback(error) {
           stopPredictIOTracker();
           alert(error);
       },
       'PredictIOPlugin',
       'start',
       ['API-KEY']);
}

Install in Minutes

Installing our SDK takes you 30 minutes. Building a battery optimized, normalized output for iOS and Android will cost you years. Trust us. We’ve been through it.

Battery Friendly

Our SDK consumes only ~2% of a total charge by running in the background. The same result would consume 20% of the battery on standard OS APIs.

Lower False Positives

False positives kill user experience. With native APIs you have a ~50% false positive rate for car trips. We cut it down to 10% for a typical urban driver.

Want To Get Started?

FREE SIGNUP

Documentation

You’ll find full documentation for installing and configuring our SDK. If you still have questions, our support will help you.

DOCUMENTATION