Telematics SDK - User Guide
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 Ubuntu 14.04
  • Linux Yocto Platform SDK Installer created by the system integrator for the device on which the Telematics app is expected to run

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 sdk_installer.sh.

Open the terminal, Copy the sdk_installer.sh into your working directory, say for example "my_sdk_install".

$ mkdir my_sdk_install; cd my_sdk_install
$ ./sdk_installer.sh
// 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:
    // Program Name: Sample App
    // FileName: SampleApp.cpp
    #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 subSystemsStatus = phoneManager->isSubsystemReady();
    std::cout << "PhoneManager Ready? " << (subSystemsStatus? "Yes":"No") << std::endl;
    // If telephony subsystem is not ready, wait for it to be ready
    if(!subSystemsStatus) {
    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
    subSystemsStatus = f.get();
    }
    std::cout << "PhoneManager Ready? " << (subSystemsStatus? "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