Monday, August 10, 2009

How to Run J2ME application In NetBeans?

First of all u need to Install
  • Java in your Computer. Download JDK from http://java.sun.com/javase/downloads/index.jsp
  • Netbeans Mobility Pack or Latest Version Form http://www.netbeans.org/downloads/

Once You Installed the Application Mean Open Neatbeans

Step 1:
  1. Choose File > New Project (Ctrl-Shift-N). Under Categories, select Mobility. Under Projects, select MIDP Application and click Next.
  2. Enter Project Name field . Choose the Diretory you want to save the project.
  3. Check the Set as Main Project checkbox and remove the check from the Create Hello MIDlet checkbox. Click Next.
  4. Select the Sun Java Wireless Toolkit 2.52 for CLDC as the Emulator Platform and use the remaining defaults. Click Finish.
  5. Now you created a project .The project folder contains all of your sources and project metadata, such as the project Ant script.
  6. Right-click the defaultPackage node in the Explorer window and choose New > MIDlet
  7. Enter HelloMIDlet as the MIDlet name. Click Finish. TheHelloMIDlet.java file is created and the source code is displayed in the IDE's Editor window.
  8. Now add the code following code in the existing code.
    import javax.microedition.lcdui.*;
    /**
      * @author Abbas*/
      public class HelloWorld extends MIDlet implements CommandListener{
      Form form;
      Command exit;
      StringItem text;
      Display disp;
      public void startApp() {
      disp=Display.getDisplay(this);
      initilize();
      disp.setCurrent(form);}
      public void pauseApp() {}
      public void destroyApp(boolean unconditional) {}
      public void initilize(){
      form=new Form("HELLO WORLD");
      text=new StringItem("Hai How are u?","Bye",StringItem.PLAIN);
      exit=new Command("Exit",Command.EXIT,1);
      form.append(text);
      form.addCommand(exit);
      form.setCommandListener(this);}
      public void commandAction(Command cc,Displayable dd)
      {
      if(cc==exit)
      {
      destroyApp(true);
      notifyDestroyed();
      } }}

      Thats all ... Now you can run the Application
      1. Right Click the Project Folder and Choose the Run. Or Press F6.
      2. If you done any changes , Use F9 to complie and F6 run.
      Now Create sucesfully created a Hellow World J2ME Application in one of Two Ways

      Creating using Visual Mobile Designer is Another way to create application.





      Saturday, August 8, 2009

      What is LWUIT? and What is JavaFX Mobile?

      • LWUIT (Lightweight UI Toolkit) is a UI toolkit library for Java ME.

      LWUIT is aimed at current Java MIDP and Swing developers who are looking to enhance the interfaces of new or existing Java ME applications on MIDP 2.0 devices. LWUIT offers pre-made graphical functions and features that developers can quickly and easily assemble into a compelling interface. LWUIT allows developers to worry less about the building blocks and instead focus on a consistent and richer interface across phones. As a binary library that developers simply deploy together with their applications LWUIT works on the vast majority of today's mobile phones and platforms supporting MIDP 2 (including Windows Mobile as described here) as well as MSA devices going forward.

      In short, LWUIT is the solution for building attractive and engaging applications on mass-market devices today.

      • JavaFX Mobile is a Java ME platform with the JavaFX runtime (including JavaFX Script) on top of it.

      JavaFX Mobile is targeted at developers, designers, and scripters who are looking to create very rich, very immersive experiences across the "screens of your life" (phone, desktop, TV, etc.). The amount of interactivity, animation, and control over the user's screen brings a new level of functionality to devices. Java FX Mobile requires MSA-enabled platforms which comprise the small but growing higher end of the mobile space - smart phones and high end feature phones.


      JavaFX uses JavaFX Script, a declarative statically typed scripting language that allows people to build out interfaces by describing the functionality that they want to see, instead of building it from the ground up. This lets them think creatively and be creative. JavaFX includes scalable fonts, 2D graphics, rich animations, integrated audio and video, and as noted, you can build apps that will run across all the screens of your life. In addition, with JavaFX, you can use design tools like Photoshop and Illustrator to build out graphical elements and even entire interfaces that you can directly build into and manipulate within JavaFX. This lets the designers and developers work much more closely and efficiently together.


      In short, JavaFX Mobile is the next quantum leap for the mobile Java platform - coming to devices in 2009.


      Reference : http://weblogs.java.net

      Friday, August 7, 2009

      What is WAP Push?

      If u want to download any mobile application or conten mean, the application provider or network operator will send you a special SMS,just if you click that SMS mean, it will download the application form server using your GPRS Connection.

      To be more clearly,

      WAP Push is a SMS within the header of which is included a link to a WAP address. On receiving a WAP Push, the compatible mobile handset automatically gives the user the option to access the WAP content on his handset. The WAP Push directs the end-user to a WAP address where content is stored ready for viewing or downloading onto the handset. This wap address may be a page or a WAP site.

      WAP Push applications are being used in the delivery of mobile related content such as polyphonic ringtones, java mobile games, applets , weather forecasts and stock price alerts , color screensavers, and picture messages, incoming email alerts, advertising campaigns. The advantages WAP Push

      WAP Push offers immediate and tangible benefits to mobile network operators, their subscribers and third party content and service providers alike.

      Ref :http://www.indianchild.com/wappushapplications.htm

      Tuesday, August 4, 2009

      Near-Field Communication and the Contactless Communication API

      Near-field Communication (NFC) is characterized as a very short-range radio communication technology with a lot of potential, especially when applied to mobile handsets. Usages of NFC include the electronic wallet to make payments using your handset, the same way you do with your credit card. With NFC all this is possible. But NFC is still a young technology. That said, NFC-enabled handsets are being introduced into the market, and deployments and pilots around the world are occurring. This article explores NFC and how you can leverage it in your Java application by using the Contactless Communications API.

      Introduction to NFC Technology

      What exactly is NFC technology? NFC is a radio communication standard that enables wireless data transfer between two devices at a very short distance -- less than 10 centimeters. NFC devices include a certain class of radio-frequency identification (RFID) tags and contactless smart cards. NFC devices operate within the 13.56 MHz frequency range, and they support extremely low data rates -- a maximum of 0.42 Mb per second.

      Compared to Bluetooth and Wi-Fi, NFC technology operates at drastically reduced transfer rates and only within a very small proximity. If that's the case, why use NFC technology? Here are three reasons:

      • Setup time. NFC devices communicate instantly -- in less than 100 milliseconds -- when placed within range.
      • Power consumption. NFC tags and cards do not consume power, so their lifespan can be unlimited.
      • Cost. NFC tags and cards are inexpensive to manufacture compared to other wireless technologies.

      NFC technology has easily met the need for certain use cases in the industry, such as the following:

      • Wireless payments. Traditional smart cards have been used for cashless payments for years. The short setup time for NFC devices allows mobile payments to be even easier.
      • Smart magazines and posters. Want to get more information about something you read in a magazine or see on a poster on the street? Just tap the page to get more information, or get the URL to store the bookmark for later use.
      • Transit tickets. When used in scenarios for mass transit, NFC-enabled phones are simple and convenient.
      • Business-card exchange. Because setup times for communication between NFC devices are very short, NFC devices are ideal for business-card exchanges.
      Reference :www.java.sun.com