Raw Data API

You can access the raw data or unprocessed data from the SDK using LotaData's APIs.

Produce Data

By now, you should have completed the integration of our SDK in your mobile app. Now install your app with the LotaData SDK on an Android phone and test the device and/or the app for a couple of minutes. You will be able to view the location signals and activity data sent to our cloud using below APIs.

Fetch All Devices

You can query our API to obtain the complete list of mobile phones that have sent back data to our cloud.

http://api2.lotadata.com/v2/trail/summary?
api_key=your_API_key&
bucket=your_Bucket_ID

The query returns a series of JSON objects. Each object includes information about:

  • Device Make
  • Device Model
  • ADID or IDFA
  • Package or Bundle
  • Count of total location signals fetched from device
  • Centroid of all location signals collected
  • Date and time when first active
  • Date and time when last active

Sample JSON resultset.

{
    device: {
        make: "samsung",
        model: "SM-G950F",
        id: "8f2268d9-3970-4bf8-9d46....."
    },
    bundle: "com.example.rockstar.awesomeapp",
    info: {
        owner: "Rockstar Developer",
        mainCluster: {
            lon: 103.848266,
            lat: 1.282653
        },
        startArea: "Singapore 068641",
        signalCount: 4,
        lastActive: "2018-03-12T09:56:36",
        firstActive: "2018-03-01T11:16:48"
    }
},
{
    device: {
        make: "samsung",
        model: "SM-N950F",
        id: "921260ab-b152-4e94-a078....."
    },
    bundle: "com.example.rockstar.awesomeapp",
    info: {
        owner: "Rockstar Developer",
        mainCluster: {
        lon: 103.837280,
        lat: 1.282653
    },
    startArea: "Singapore 059661",
    signalCount: 27,
    lastActive: "2018-03-18T19:03:04",
    firstActive: "2017-01-17T05:11:02"
    }
}

Fetch Location Signals

You can query to obtain the complete list of raw location signals or data points across all your devices by adding fieldset=signals to the previous API.

http://api2.lotadata.com/v2/trail/summary?
api_key=your_API_key&
bucket=your_Bucket_ID&
fieldset=signals

The query returns a series of JSON objects. Each object includes the core information about the device as well as the complete trail of geopoints (latitude + longitude) collected from each device.

Sample JSON resultset.

{
    device: {
        make: "samsung",
        model: "SM-G950F",
        id: "8f2268d9-3970-4bf8-9d46....."
    },
    bundle: "com.example.rockstar.awesomeapp",
    signals: [
        {
            pt: [
                    103.8468289,
                    1.2803239
                ],
            on: "2018-03-12T09:56:36"
        },
        {
            pt: [
                    103.8466342,
                    1.2804333
                ],
            on: "2018-03-12T09:43:04"
            },
        {
            pt: [
                    103.8466342,
                    1.2804333
                ],
            on: "2018-03-12T09:42:50"
        },
        {
            pt: [
                    103.8468289,
                    1.280323
                ],
            on: "2018-03-12T09:42:20"
        }
    ],
    info: {
        owner: "Rockstar Developer",
        mainCluster: {
            lon: 103.848266,
            lat: 1.282653
        },
        startArea: "Singapore 068641",
        signalCount: 4,
        lastActive: "2018-03-12T09:56:36",
        firstActive: "2018-03-01T11:16:48"
    }
},

Fetch In-App Events

You can also query to obtain the complete list of in-app events that were tagged across all your devices by adding fieldset=inappevents to the previous API.

http://api2.lotadata.com/v2/trail/summary?
api_key=your_API_key&
bucket=your_Bucket_ID&
fieldset=events

The query returns a series of JSON objects. Each object includes the core information about the device as well as the complete list of in-app events collected from each device.

Sample JSON resultset.

{
    stats: {
        runtime: 180,
        count: 1,
        timeout: false
    },
    data: [
        {
            device: {
            make: "google",
            model: "Pixel 2",
            id: "74581e1d-7a56-44c6-9498-663d....."
            },
            bundle: "com.example.lotademo",
            packages: [ ],
            events: [
            {
                action: "move",
                serverOnline: true,
                mode: "STAY_DETECTION"
            },
            {
                action: "departure",
                deviceOnline: true,
                mode: "STAY_DETECTION"
            },
            {
                action: "sys",
                my: {
                    tag: "background"
                },
                deviceOnline: true,
                serverOnline: true,
                mode: "STAY_DETECTION"
            },
            {
                action: "sys",
                my: {
                    tag: "active"
                },
                deviceOnline: true,
                serverOnline: true,
                foreground: true,
                mode: "HAWK_EYE"
            },
            {
                action: "sys",
                my: {
                    tag: "charged"
                },
                deviceOnline: true,
                serverOnline: true,
                foreground: true,
                mode: "HAWK_EYE"
            },
            {
                action: "move",
                deviceOnline: true,
                serverOnline: true,
                mode: "STAY_DETECTION"
            },
            {
                action: "move",
                deviceOnline: true,
                serverOnline: true,
                mode: "STAY_DETECTION"
            },
            {
                action: "tag",
                my: {
                    tag: "Start SDK"
                },
                deviceOnline: true,
                serverOnline: true,
                foreground: true,
                mode: "HAWK_EYE"
            },
            {
                action: "init",
                deviceOnline: true,
                serverOnline: true,
                foreground: true,
                mode: "HAWK_EYE"
            },
            {
                action: "tag",
                my: {
                    tag: "Start SDK"
                },
                deviceOnline: true,
                serverOnline: true,
                foreground: true,
                mode: "HAWK_EYE"
            }
        ],
        info: {
            owner: "Internal Lotadata SDK Test"
        }
    }
    ]
}

Questions?

We are eager to hear from you and happy to share best practices for integrating the SDK. There are many ways for you to reach us:

But first, please sign up for an account with LotaData so that we may send you the link to download our SDK.


Was this helpful? Yes, thanks! Not really

results matching ""

    No results matching ""