======================================= Setting the application on the Android ======================================= Introduction ============ Devolping an application on **Aakash**, the basic software platform utilised was Eclipse (Indigo). The Android Version 2.2 was the supporting version to devlop and implement an application on AAKASH. The objective to port the programming languages C, C++,Python and Scilab needed an interface on android, thus Android application package file (APK) was devloped on Eclipse and was tested rigorously to achieve the perfect version. Setting up the Android Envionment ================================ + **Android SDK** * Download the android SDK from the official website `developer.android.com `_ + **Software platform- Eclipse(Indigo)** * The basic software platform to devlop an application for that need to install Eclipse. * The official website to `eclipse `_. The basic command for ubuntu users to check their configured version is `uname -a`. Type the command on the terminal and check for the system is 64 or 32 bit. * The linux users should install the proper version, as their is availabilty of two versions 64 and 32 bit. + **Installing the Packages in SDK Manager** * Configure the SDK manager and download tools and packages for different Android versions. * For example the Android 2.2 (froyo), Android 2.3 (ginerbread), Android 3.0 or 3.1 (honeycomb), Android 4.0 (ice cream sandwich) + **Adding and Configuring the ADT plugin** * Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT). This plugin is designed to give you a powerful, integrated environment in which to develop Android apps. It extends the capabilites of Eclipse to let you quickly set up new Android projects, build an app UI, debug your app, and export signed (or unsigned) app packages (APKs) for distribution. + **Setups for configuring** : `NOTE` : before starting the ADT plugin process (if installing from the internet), apply net settings in the Eclipse, select Windows > Preferences . On General option , click on Network and configure the internet settings. * Start Eclipse, then select Help > Install New Software.... * Click Add, in the top-right corner. * In the Add Repository dialog that appears, enter "ADT Plugin" for the Name and the following URL for the location `https://dl-ssl.google.com/android/eclipse/ `_ * Click OK. `Note`, If you have trouble acquiring the plugin, try using ``http`` in the Location URL, instead of ``https`` (``https`` is preferred for security reasons). * In the Available Software dialog, select the checkbox next to Developer Tools and click Next. * In the next window, you'll see a list of the tools to be downloaded. Click Next. * Read and accept the license agreements, then click Finish. * When the installation completes, restart Eclipse. + **Configure the ADT Plugin** * After you've installed ADT and restarted Eclipse, you must specify the location of your Android SDK directory. * Select Window > Preferences... to open the Preferences panel (on Mac OS X, select Eclipse > Preferences). * Select Android from the left panel. * For the SDK Location in the main panel, click Browse... and locate your downloaded Android SDK directory (such as android-sdk-windows). * Click Apply, then OK. + **Create new AVD** * Create a new avd in AVD manager and mention proper memory size of the SDcard and launch the emulator. + **Create your new project** * The android environment is set , create new projects and enjoy the android versions. Developing the APK for the Porting of the Programming Languages =============================================================== * The project was entiltled as `Aakash Programming Lab (APL)` * The package name : **com.aakash.lab** * In the android project mainly the editing part was in layout,Activity(java class) and in AndroidManifest.xml + **Designing the Layout for the application** * The layout of the android APK consists of three xml files namely as `main.xml, main1.xml, and main2.` * `main.xml` contains the features for the first screen that displays the four main icons of the programming languages **C, C++, Python and Scilab**, besides the main heading **Aakash Programming Lab (APL)**. * The icons were padded properly to fit according to tablet screen size and resolution * The icons were polished and scaled for glossy display of the application on the tablet screen. :: .. image:: images/apl.png :name: apl main icon page :align: center + * In order to display the web page of the each programming language main1.xml was created. * The webview feature was added in the xml file, which will be utilised by the each webpage of programming language to display the its key features and functionality. :: .. image:: images/text_console.png :name: text editor and console output page :align: center + * In order to display the web page for Help and About main2.xml was created. * The webview feature and Button was added in the xml file, the webview for webpage of help and options , and a close button to take back the user back to the previous state. ::