Visit our new documentation site! This documentation page is no longer updated.

Mobile SDKs Overview

The article describes the following SDKs.

With this SDKs, you can import data on your application into Treasure Data. In that case, you don’t need to build servers.

Table of Contents

Mobile SDKs Features.

The SDK has the following functions:

  • Add the event that occurs in the application (buffering at the client side)(addEvent/addEventWithCallback)
    • Encrypt/Decrypt the buffered data with arbitrary common key automatically (initializeEncryptionKey, default:disable)
  • Upload the buffered events to TD (To avoid the data loss, the buffered data is cleared only when the upload is success.)(uploadEvents/uploadEventsWithCallback)
    • Retry the upload a certain number of times in the case of a upload failure(Exponential backoff) (enableRetryUploading/disableRetryUploading, default:enable)
      • The uploaded data is automatically compressed to one eighth of its original size(enableEventCompression/diableEventCompression, default:enable)
  • Register which of the Callbacks to call, depending on the success or failure of the operation(Event adding or Uploading)(addEventWithCallback/uploadEventsWithCallback)
  • The SDK generate unique ID for each device. Since this ID is added to each event automatically, it makes aggregating each device’s data easy.(enableAutoAppendUniqId/disableAutoAppendUniqId, default:disable)
  • Add OS version or device model information to each event automatically.(enableAutoAppendModelInformation/disableAutoAppendModelInformation, default:disable)
  • The SDK generate session id for each session initiation/termination. Since the session id is added to each event automatically, you can aggregate per a sequence of events occurred in application.(startSession/endSession)
  • Detect the first running of applications, since SDK monitors whether applications were running or not.(isFirstRun/clearFirstRun)
  • Prevent data duplication even if you update multiple times by executing de-duplication at server side. (Currently, executing de-duplication every day)

The string which is described at the end of each function is the SDK API name (TreasureData class' method name in concrete terms.). You need to configure the database and the table for registering events in the SDKs. They works with the destination database and the destination table in Treasure Data.

For example, the following picture shows a part of sample data on Treasure Data when using startSession and endSession with activating enableAutoAppendUniqId and enableAutoAppendModelInformation.


Account Management for Mobile SDKs

Treasure Data requires API Keys for authentication when you import data or issue a query. In the case of using SDK for mobile SDKs (also Javascript SDK), recommend the following steps.

  • Create database on Treasure Data for importing from SDKs.
  • Associate user who is granted access to the above database, with Treasure Data user.
  • Generate ‘Write-only’ API keys for the above user.
  • Use generated “Write-only" API keys on SDKs.

After clicking the “My Profile” which is located at top-right of the screen at and inserting your password under the “API Keys” panel, you can generate “Write-only” API keys.


How to use Mobile SDKs

To know more details, please see the following link.

Last modified: Dec 24 2016 00:46:56 UTC

If this article is incorrect or outdated, or omits critical information, let us know. For all other issues, access our support channels.