Telematics SDK - User Guide  v1.11.0
Steps to writing an App

This section has instructions to create a sample application using Telematics APIs.

You need to have the following in order to proceed:

  • Linux Yocto Platform SDK Installer created by the system integrator or created using section 2 (Building Platform SDK)

Source the environment

Install the Linux platform SDK created by the platform developer for the intended device. Let's assume that the installer is named

  • Open the terminal, Copy the into your working directory, say for example "my_sdk_install".
    $ mkdir my_sdk_install; cd my_sdk_install
    $ ./
    // Choose to install to my_sdk_install when the SDK installer asks
  • Setup the build environment as follows:
    $ cd my_sdk_install; source environment-setup-cortexa8hf-vfp-neon-oe-linux-gnueabi

Now your development environment is set for the terminal, start your development.

To get started with a sample app

  • Create a sample folder
    $ mkdir sample_app
  • Create a sample application as follows:
    // FileName: SampleApp.cpp
    // Description: Sample program to check the status of telux::tel::PhoneManager.
    #include <iostream>
    #include <memory>
    #include <telux/tel/PhoneFactory.hpp>
    // This is sample program to get an instance of PhoneManager
    // and check for telephony sub system status
    int main() {
    // Get the PhoneFactory and PhoneManager instances
    auto &phoneFactory = telux::tel::PhoneFactory::getInstance();
    auto phoneManager = phoneFactory.getPhoneManager();
    // Check if telephony subsystem is ready
    bool status = phoneManager->isSubsystemReady();
    std::cout << "PhoneManager Ready? " << (status? "Yes":"No") << std::endl;
    // If telephony subsystem is not ready, wait for it to be ready
    if(!status) {
    std::cout << "wait unconditionally for it to be ready " << std::endl;
    std::future<bool> f = phoneManager->onSubsystemReady();
    // If we want to wait unconditionally for telephony subsystem to be ready
    status = f.get();
    std::cout << "PhoneManager Ready? " << (status? "Yes":"No") << std::endl;
    // Now the application ready for SDK services like Phone, SMS, CardServices
    return 0;

Compile the program

  • Now compile your source code
    user@machine:/sample_app$ ${CC} SampleApp.cpp -ltelux_tel -std=c++11 -lstdc++ -o sample_app

Install apps on the device

  • Push your binary to the /data location on the device
    user@machine:/sample_app$ adb push sample_app /data/
    user@machine:/sample_app$ adb shell
    $ cd data
    $ chmod +x sample_app
    $ ./sample_app