Beginning Mobile Application Development - Part 2 PDF Print E-mail
Written by Pradeep Kumar   

Beginning Mobile Application Development - Part 2

 

Choices for available platform is covered in Part 1. Choice of programming language for development mostly depends on the developer. For designed its matter of patters that he would like to use as per the requirement.

As per the market study Nokia still have larger share than any other mobile phone manufacturer. Nokia make phone for everyone from basic handset that supports only voice call to high-end phone as Nokia N97. Application development is supported only on the mobile, those have either J2ME support or have Symbian OS. Eariler Symbian was properitory os but now it has become open source, so chances are there that symbian phone may become more cheaper.

 

On Symbian platform, we can develop application using C++, Java or FlashLite.

Application development for Symbian OS is supported by Nokia, by providing Nokia Forum. Similarly Samsung, Sony Ericsson and Motorola provide developer forum to help developer.

 

Now a days developing application for mobile phone has variety of choice, one can develop application using just javascript.

Web Runtime is one of the platform in which using html/javascript one can develop application for mobile phone.

 

On Symbian a basic POSIX C program can be executed without any problem.

 

Basic Hello World! program

 


#include <stdio.h>

int main(void)
{
printf("Hello World!\n");
printf("Press any character key to exit!");
int c = getchar();
return 0;
}


 

This code can be compiled using gcce and you will get ARM processor compatible binary that you can execute on handset.

 

Before proceding for compilation we need to install the compiler and libraries.

SDK for symbian is currently provided by Nokia.

Nokia S60 SDK can be downloaded from Nokia Forum.

Carbide.C++ IDE for Symbian can be download from here

 

For SDK and Carbide.C++ you will need Java Runtime which can be downloaded from Sun website.

 

After installing Java JRE, S60 SDK and Carbide.C++ we can proceed for compilation.

 

Procedure for installing this hello dear program on handset is as follows

  • Save this source code in a file and name it, for now say HelloDear.cpp
  • For compiling source code for symbian you need to make a bld.inf and .mmp file - i will explain later why do we need this two files
  • Lets create a bld.inf and HelloDear.mmp empty files
  • bld.inf contains name of .mmp files so it will have following content
    • PRJ_MMPFILES
    • HelloDear.mmp
  • HelloWord.mmp will have following content
    1. TARGET              HelloDear.exe // This the executable name that we want to generate
    2. TARGETTYPE      exe  // This is the type of application that we are making, it can be dll or exe, other symbian formats are also there
    3. UID                    0x100039CE 0xED9143FF //This is an important part of symbian application identifier, this is unique identifier for application
    4. VENDORID          0 // This is the vendor id
    5. SOURCEPATH      ..\src // Path for source code
    6. SOURCE              HelloDear.cpp // Code file name
    7. SYSTEMINCLUDE  \epoc32\include\stdapis //include directory path
    8. SYSTEMINCLUDE  \epoc32\include //include directory path
    9. STATICLIBRARY   libcrt0.lib // statically linked library
    10. LIBRARY             libc.lib // dynamically linked library
    11. LIBRARY             euser.lib
  • Following is standard directory structure for symbian application
    1. Data - Contains Resource files
    2. Inc - header files
    3. Src - source files
    4. Group - build related files. i.e. bld.inf and mmp files
    5. Sis - package file
  • After compilation we get a HelloWorld.exe but we cannot execute it directly on handset like we do on windows
  • We need to make a installer file that will install this exe onto the phone, to create this installer we need a configuration file and it is known as package file and has extension of .pkg
  • we will have HelloDear.pkg
  • using createsis.exe we can create HelloDear.sis which can be installed on handset

This seems to be very complicated initially if you are a c/c++ programmer for Windows/Linux, but in actual Carbide C++ IDE does all the background task.

You just need to write the code.

For installing this sis file on Nokia Handset you will need Nokia PC Suite.

 

 

 

 

 

 

 
More Articles...
  • Begining Mobile Application Development - Part 1
  • Paijwar Networking Tools
«StartPrev123NextEnd»

Page 1 of 3
 
  • Home
  • Contact

Who's Online

We have 2 guests online



  • Forgot your password?
  • Forgot your username?
  • Register

Copyright © 2009 Paijwar.com