ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Simple Steps to Start Developing Mobile Applications (Cellphone APPS) in Java

Updated on December 23, 2011

Introduction

If you're searching for some simpler ways and methods to familiarize yourself with world of "Mobile Application Development", then, I think you finally landed on correct destination (article). Here, I'll show you all the steps that are required in understanding and making usage of this great platform of Application Development, which will help you in reaching pockets of humans without going there. I called Mobiles / Cellphones a great platform because this is the platform which remains active nearly 24 hrs a day either in hands of people or in pockets and can be accessed by users (i.e. owners of devices) at anywhere and at anytime. It is one of the most nearest and closest part of everyone (Who use them).

Difference between mobile app and mobile web
Difference between mobile app and mobile web | Source

Programming Language for Developing Mobile/Cellphone APPS

There are lot of languages and tools by which you can develop mobile apps but problem arises when some devices failed to install/run our applications due to limited device compatibility. But, there exist a language called Java ME (j2me) (A smaller form of java , which has been released to cover cellphone market) and is supported by maximum number of devices in this market. Here, "ME" in Java ME is shorter form of "Micro Edition". It divides devices into two type of configuration i.e. CLDC and CDC, which is explained below.

  1. CLDC - Connected Limited Device Configuration,
  2. CDC - Connected Device Configuration.

"CLDC" includes the range of phones which are unable to support full features of java due to limitations in storage, memory and power etc., while on other hand range of phones falling in "CDC" category doesn't have such shorter limits and they also have their own plus points. Let's end up our discussion here and come to procedure. Here, Below aresteps that are required in building up your first cellphone/mobile application.

Installing and running Java ME (Micro Edition) SDK (Software Development Kit)

These section deals with steps that are required to be followed at minimum before developing your first cellphone application, just follow them.

  • Download Java ME SDK (3.0 or Latest Version) from here (I'm using Java ME SDK 3.0 and it is my personal recommendation to start with).

Software and System Requirements:

  1. Java SE Development Kit - JDK 1.6 or latest,
  2. NetBeans version 6.9 or higher for installing Java ME SDK 3.0.5 and higher versions, which is not my personal recommendation for beginners while considering my future tutorials in mind.
  • After fulfilling the system requirements by downloading and installing necessary softwares, Click on executable (.exe) file of Java ME SDK to install and make it run. Below is the sample snapshot of Java ME SDK 3.0 (similar to its first run).

The Start page of java ME SDK 3.0.
The Start page of java ME SDK 3.0. | Source

Creating and Editing your first Mobile APP

This section covers the steps that are required in creating and developing your first cellphone APP (i.e. a simple hello world program) with this SDK.

  1. After Installing, Go To Start -> Programs -> Java(TM) ME Platform SDK 3.0 -> Java(TM) ME Platform SDK 3.0 OR if you downloaded and installed 3.0.5 or higher versions, then, go to Go To Start -> Programs -> NetBeans -> (NetBeans IDE 7.0.1 or any which is installed on your computer).
  2. Then, after opening SDK, Go to File (Top-Left Corner) -> New Project -> Java ME -> MIDP (or mobile) Application -> Next (At Bottom) -> Next - > Finish.
  3. And, Finally A screen will appear on your screen with some j2me code in it. This is the Code which is required at minimum by any j2me (Mobile/Cellphone) application for proper functioning. I would not recommend to delete it because it will never interfere in your development cycle except the "startApp()" function which plays crucial role in beginning of application life cycle.

In simpler terms, "startApp()", "pauseApp" and "destroyApp" are life cycle functions of any application which executes automatically at three different states of any applications which are explained below.

  1. "startApp()" - executed on top of everyone to begin application life cycle.
  2. "pauseApp()" - get executed when application goes in state of being paused i.e. user has moved his focus from current application to some other tasks in his/her device. for example, when a phone call comes in between the usage of this application by user, application automatically goes into pause state.
  3. "destroyApp()" - get executed when user exits the application i.e. termination of life cycle.

Running your First Application

This section deals with steps that are required in running your first mobile application ("Hello World!" program).

You can run your application in three type of modes either from menu bar (by clicking on "RUN") or by right clicking on project.

  • Either you can run directly, which will skip the process that will be faced by real users while installing it,
  • Or you can run it via OTA (Over the Air), which will try to show you all the steps that will faced by users while installing your application in their devices.
  • Third one (Running in Debug Mode) helps us in finding out bugs and errors (if any).

Below is the snapshot showing "how to run project" via right clicking on it.

Running your first application in real device (Mobile/Cellphone)

To run your first application on your phone, then, you can do so by following steps shown below.

Steps need to be followed if you build application via Java ME SDK 3.0

  1. Go to: "C:\Users\seven\Documents\JavaMESDKProjects\your~project~name\dist\",
  2. Then, you'll see two files with your project name but with twoo different file extension i.e. with ".jad" and ".jar",
  3. Send that jar file to your phone and install it.
  4. after that you can go to applications folder in your cellphone and try running it.

Steps need to be followed if you build application via Netbeans IDE and Java ME SDK 3.0.5

  1. In this case, you will find applications here "C:\Users\seven\Documents\NetBeansProjects" and all other steps are same.

Source

"Source Code" of this program is explained in next chapter (Article), Where you will learn about "How it is easy to code applications in java and j2me" (If you never programmed and tried your hands with this language).

Comments

    0 of 8192 characters used
    Post Comment

    • moneytoplist profile image

      moneytoplist 

      6 years ago

      I tried to learn java mobile but I gave up after a few days. I found out I can build the application I need using HTML 5 and jquery mobile and it seems to be much easier way for me.

    • itech profile imageAUTHOR

      Krishna 

      6 years ago from Dausa, India

      Okay Fine! Just mail me your code.

    • profile image

      honey 

      6 years ago

      i am still trying to insert audio,video,image but not at found ythe correct solution..

      can u help me to write the correct code

    • profile image

      me 

      6 years ago

      thank u.it is helped me

    • profile image

      honey 

      6 years ago

      How many days will u take to send answer.it's very urgent can u send me as soon as possible

    • profile image

      jo 

      6 years ago

      can u tell how we can insert audio nd video

    • profile image

      honey 

      6 years ago

      how we can insert the audio,text n vedio files into this jar files

    • itech profile imageAUTHOR

      Krishna 

      6 years ago from Dausa, India

      @swarna, glad to know that!!!

    • profile image

      swarna 

      6 years ago

      Thank u..it is helped me a lot........

    • itech profile imageAUTHOR

      Krishna 

      6 years ago from Dausa, India

      @emma, Glad to see that you liked it. if you prefer not to use "Netbeans" then You should download Java Me SDK 3.0 (My Personal Recommendation) which has inbuilt IDE (Integrated Development Environment) and very simple interface to work with. Here is the download link http://www.oracle.com/technetwork/java/javasebusin...

    • profile image

      emma 

      6 years ago

      am loving this. bt wish to do it witout netbeans

    • itech profile imageAUTHOR

      Krishna 

      7 years ago from Dausa, India

      @admire, thanks for admiring.

    • profile image

      admire 

      7 years ago

      i just loved it its awesome thanx guys

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://hubpages.com/privacy-policy#gdpr

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)