Skip to main content

Asset & fleet tracking with Ubidots: a GPSLogger Android example

Asset/fleet tracking prototype in 10 minutes: send GPS data from an Android phone to Ubidots using free GPSLogger. Good starting point for integrators.

Written by Sergio M

What you'll build: a working asset / fleet tracking prototype on Ubidots in about 10 minutes, using an Android phone you already have and the free GPSLogger app. The same pattern (an HTTPS POST with position, device label, and timestamp) works for any GPS source that can reach an HTTPS endpoint — including custom mobile apps for personnel tracking, smart meter reading apps that tag location, courier or field-service apps, and dedicated LTE / LoRaWAN trackers.

GPSLogger Android app configuration screen for sending GPS data to Ubidots

You’re just 3 steps away from creating your own GPS-tracking application, without writing any code!

GPSLogger Android App

GPSLogger Android app configuration screen for sending GPS data to Ubidots

GPSLogger is an Android application that uses the phone's GPS to gather positioning data but, unlike other GPS apps, it offers several approaches on what to do with the data, such as sending the data through custom HTTP requests, enabling a straight-forward integration with Ubidots.

Why build GPS tracking solutions?

Just as for most electronic products, the prices of GPS trackers have been dropping, making them suitable for a growing set of asset monitoring applications that were impossible before. As the price (and size) of GPS trackers continue to drop, more types of assets are being possible to track in real-time, uncovering new business opportunities for IoT entrepreneurs and systems integrators alike.

GPSLogger Android app configuration screen for sending GPS data to Ubidots

We hope this guide serves as an entry point to uncover asset-tracking opportunities in your domain.

Requirements

  • An Android phone supporting GPS.

  • An active Ubidots account.

1. Download the GPSLogger app

  • Download the GPSLogger app. This app is not available on the Google Play Store. Instead, you have to download it from the official project's GitHub.

  • Launch your preferred web browser on your Android phone, head to the link provided above, download the application's APK file and install it. Make sure to download the latest stable version.

  • You'll be prompted for permission requirements, tap the "OK" button and proceed to grant the requested permissions.

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Enable the location permission only while using the app in order to optimize battery consumption.

GPSLogger Android app configuration screen for sending GPS data to Ubidots

2. Configure the GPSLogger app settings

  • Once finished granting the required permissions, tap on the upper left button as shown below:

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Tap on the "Custom URL" option:

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Configure the following settings:

    • Enable the "Log to custom URL" and "Allow auto sending" options.

    • Paste the following line in the URL field

      https://industrial.api.ubidots.com/api/v1.6/devices/%AID

      Note that "%AID" is a variable that stores a unique identifier for your phone, which will be used as the device label according to: How to send data to an Ubidots device.

    • Tap the HTTP Body option and paste:

      {"position":{"lat":%LAT, "lng":%LON}, "speed":%SPD, "altitude":%ALT, "satellites":%SAT, "accuracy":%ACC, "battery": %BATT, "travelled":%DIST, "direction":%DIR}

    • Tap the HTTP Header option and paste the following, taking into account that you have to change "<your-account-token>" for your Ubidots token:

      Content-Type: application/json
      x-auth-token: <your-account-token>

    • Tap the HTTP Method option and write POST

  • At last, it should look like this:

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Head back to the main menu, press the hamburger button and tap the "Performance" option:

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Enable both Log GPS/GNSS locations and Log network locations.

  • By default, the app takes the position data every 60 seconds; if you want to change that value, you can do so by changing the Logging interval setting

GPSLogger Android app configuration screen for sending GPS data to Ubidots
  • Head back to the main menu and tap the "START LOGGING" button. This will start the position data capturing and its corresponding delivery to your Ubidots account.

3. Visualizing data on Ubidots

  • Go to your Ubidots account Devices Devices. There, you'll be able to see a newly created device with data from different variables, as shown below:

GPSLogger Android app configuration screen for sending GPS data to Ubidots

Wearable tracking alternative: for personal/worker tracking on LoRaWAN instead of cellular GPS, see LoRaWAN smart helmet for worker safety tracking.

Frequently asked questions

How do I track an Android phone with Ubidots?

Install the free GPSLogger Android app, configure it to send HTTPS POST requests to your Ubidots device endpoint (https://industrial.api.ubidots.com/api/v1.6/devices/<your-device),> and the phone's GPS coordinates will appear in Ubidots in real time. No coding required for the basic setup; full instructions are in the steps above.

Can I use this for production fleet tracking?

The GPSLogger + Android phone setup is a fast prototype, not a production deployment. For real fleets, use a dedicated LTE GPS tracker (e.g., a Quectel-based device or a LoRaWAN tracker) that sends data via MQTT or HTTPS to Ubidots. The Ubidots side stays the same — only the data source changes.

Does GPSLogger work without internet?

GPSLogger can record GPS data locally without internet and upload later when a connection is available — useful for areas with intermittent coverage. To send data to Ubidots in real time, the Android phone needs an active mobile data or Wi-Fi connection.

How often does GPS data sync to Ubidots?

You configure the upload interval in GPSLogger. Common settings: every 10 seconds for live tracking demos, every 30-60 seconds for normal fleet visibility, or every 5+ minutes for low-bandwidth scenarios. Each upload counts as one dot in your Ubidots plan, so balance frequency against your dot budget.

Can I use this to track personnel for safety?

Yes, the same pattern works for lone-worker or field-personnel tracking — an Android phone with GPSLogger streams location to Ubidots, where you set up events for geofence violations or extended inactivity. For wearable-only deployments (no phone), see the LoRaWAN smart-helmet example linked below.

What's the difference between this and a dedicated GPS tracker?

A dedicated GPS tracker is hardened for vehicle/outdoor use (waterproof, fixed power, lower battery drain than a phone), and ships with an LTE or LoRaWAN modem. An Android phone is cheaper for proof-of-concept and lets you iterate the integration before committing to hardware. The Ubidots integration code is identical either way.

Where to go from here

Once you've confirmed live location data flowing into Ubidots from the Android phone, you can swap the GPS source for something more production-grade. See:

Did this answer your question?