Getting Started

Before you start, make sure you have

  • an iRoar device,
  • installed the latest iRoar firmware,
  • a microSD card, and
  • downloaded the latest iRoar SDK.

Understanding the Development Process

To develop an iRoar application, you need to Create the source code and the manifest, Compile, Run the application, and Enjoy!

It will be useful to familiarize yourself with the type of files used in an iRoar application,

  • .p file contains the application's source code.
  • .amx file is the compiled output of the source code.
  • .mnf file is the manifest file containing information about your application.
  • .ipk file is the installation package that can be redeployed.

To have a better idea of what it takes to build your own custom applications for iRoar, let's create and build the Hello World application.

Building the Hello World application

  • Unzip the iRoar SDK onto your computer.
  • In the folder where you have unzipped the iRoar SDK, goto apps\ folder and create a new folder named "helloworld".
  • Within the helloworld folder, create a helloworld.p file with your favorite IDE or notepad with this code,
    printf(“Hello World”);
  • Next, in the same folder, create a helloworld.mnf file with this information,
    title Hello World
    description My first application for the iRoar.
    appid com.creative.helloworld
    version 1.00.00
  • Launch the command prompt and change the current directory to the folder where you have unzipped the iRoar SDK.
  • To build the application, execute this command from the console,
    > make helloworld
    A helloworld.ipk file will be generated in the build\ folder.

Copying applications to iRoar

  • On your computer, insert your microSD card and create an iroar-app\ folder in the storage card. This folder will store the applications that will run on the iRoar.
  • Copy the generated helloworld.ipk into your iroar-app\ folder of your microSD card.
  • Insert your microSD card into the iRoar. This will install and run all applications found in iroar-app\ folder.

Debugging an application

  • To start debugging, connect the iRoar device to your computer with a USB cable.
  • To monitor printf outputs, run irdb.exe found in the tools\ folder with administrator priviledge.
  • From the irdb console, you should see the printf output from the Hello World application.
    [7719.314][helloworld ] Hello World
    The first [7719.314] displays the time in seconds since the device powers up and the second [helloworld ] displays the application name.

Building on different platforms

If you are running on Windows, you can also use the Packager tool to edit the manifest, design the applications icon, build, run and debug your application from a graphical user interface. To learn more, read the tutorial in the next topic on building the Countdown Timer.

If you have a Linux system or prefer to use the Windows command prompt, follow these steps to create your own app,

  • make a copy of apps\template in the apps\ folder.
  • rename the copied template folder to your application name (e.g. app1).
  • open the folder and rename all the files named [template]* into your application name. For example, if your app name is app1, you will have app1.p and app1.mnf.
  • open the .mnf in your editor, edit the application title, description, icon, etc.
  • open the .p file and you can start coding your first app.
  • to compile, you can invoke : make <application-name> (e.g. make app1).
  • the generated .ipk will be in build\ folder.

What is in the Manifest?

The manifest describes your application, of which some are displayed on the iRoar Dashboard mobile application. It contains the following metadata per line:

  • title : Name of your application.
  • description : Short description of your application.
  • appid : Unique string identifying the app, preferably in the format "com.yourcompany.addonname".
  • version : Version number of the app in format (max 256 per value).
  • appicon : App icon in 0000 0000 0000 0000 0000 format. You can use the Packager tool to generate this icon.
  • publisher : Your company's name.
  • publishdate : The date in DD-MM-YYYY format when the application is published.
  • category: The category of which your application belongs to. There are four categories: 01-music, 02-entertainment, 03-utility, 04-lifestyle.
  • language: The main display language supported by your application. The format is in ISO 639-1:2002, such as "en".
  • capability: A 32bit bitmask to specify the hardware capabilities your application requires. 0x1 for microphone, and 0x2 for motion sensor.

What are the Tools Available in the SDK?

These tools are bundled in the iRoar SDK,

  • packager : Windows GUI application to edit the manifest, design icon, build, and run your application.
  • make : Compiles and packs your application.
  • pawncc : Compiles the <source-code>.p into the <source-code>.amx.
  • iroararc : Packs the <source-code>.p, <source-code>.amx, <source-code>.mnf, sounds\, and html\ folders into <source-code>.ipk.
  • irdb : Display debug outputs.