Siemens TC65 manual Hello World MIDlet, Here is a sample HelloWorld program

Page 36

TC65 JAVA User's Guide

Strictly confidential / Released

s

6.3Hello World MIDlet

Here is a sample HelloWorld program.

/**

*HelloWorld.java

*/

package example.helloworld;

import javax.microedition.midlet.*; import java.io.*;

public class HelloWorld extends MIDlet {

/**

*HelloWorld - default constructor */

public HelloWorld() { System.out.println("HelloWorld: Constructor");

}

/**

*startApp()

*/

public void startApp() throws MIDletStateChangeException { System.out.println("HelloWorld: startApp"); System.out.println("\nHello World!\n"); destroyApp();

}

/**

*pauseApp()

*/

public void pauseApp() { System.out.println("HelloWorld: pauseApp()");

}

/**

*destroyApp()

*/

public void destroyApp(boolean cond) { System.out.println("HelloWorld: destroyApp(" + cond + ")"); notifyDestroyed();

}

}

TC65 JAVA User's Guide_V05

Page 36 of 90

26.09.2005

Image 36 Contents
Java Users Guide Document Name TC65 Java Users Guide TC65 Java Users GuideSeptember 26 TC65 Java Users GuideV05Table of Contents Maintenance 3.3.2Compile and Run a Program without a Java IDE Debug EnvironmentJava Security Java Tutorial Differences from the TC45Sun Java Studio Mobility 6 Switching Emulators TablesPreamble New solution OverviewRelated Documents Terms and Abbreviations Abbreviation DescriptionInstallation Installation CDSystem Requirements Components Module Exchange Suite1.2 WTK SDK and Java StudioSiemens Mobility Toolkit Installation Installing the Standard Development ToolkitInstalling the Smtk Environment Installing Sun Java Studio Mobility Installing Eclipse Installing Borland JBuilder XInstalling Module Exchange Suite MES Smtk Uninstall UpgradesSoftware Platform Software ArchitectureInterfaces 1 ASC0 Serial Device General Purpose I/O3 DAC/ADC 4 ASC1JVM Interfaces IP NetworkingMedia Other InterfacesData Flow of a Java Application Running on the Module ADCHandling Interfaces and Data Service Resources Module StatesState 1 Default No Java Running State 4 Default Java Application ActiveState 2 No Java Running, General Purpose I/O and I2C State 3 No Java Running, General Purpose I/O and SPIState 5 Java Application Active, General Purpose I/O and I2C Module State Transitions Maintenance IP ServicePower Saving ChargingAirplane Mode AlarmShutdown Automatic ShutdownRestart after Switch Off Special AT Command Set for Java ApplicationsSwitching from Data Mode to Command Mode Mode Indication after MIDlet StartupConfiguration of Serial Interface Java CommandsRestrictions Flash File System MemoryPerformance JavaFrequencyB 1 / frequencyA Duration of each loop = 600 sPin I/O Data Rates on RS-232 APIPlain Serial Interface Voice Call in Parallel Scenarios with Gprs Connection Upload 75% 63% 55% 33% 65% 55% 33% 16%Download 91% 87% 81% 73%85% 78% 58% 48% MIDlets MIDlet Documentation MIDlet Life CycleMIDlet.destroyApp method Hello World MIDlet Here is a sample HelloWorld programCommand Line Based File Transfer to ModuleModule Exchange Suite Windows BasedSecurity Issues Over the Air ProvisioningOtap Over The Air Provisioning Otap Introduction to OtapOtap Overview Parameters Max. Length AT Keyword SM Install/update Delete Otap ParametersInstall operation Short Message FormatDelete operation Java File Format Procedures Install/Update Delete Time Out Values and Result Codes Tips and Tricks for OtapOtap Tracer SecurityHow To Compile and Run a Program without a Java IDE Build ResultsCompile Run on the Module with Manual StartRun on the Module with Autostart Switch on Autostart Switch off AutostartDebug Environment Data Flow of a Java Application in the Debug EnvironmentEmulator Java IDE Sun Java Studio Mobility 6 2004Q3 Switching emulators Projects Templates ExamplesCompile and run JBuilderX JDK settings Borland JBuilderExamples TC65 Java Users Guide JBuilder2005 JDK settings Eclipse IntegrationEclipse Plug-in installation Eclipse J2ME platform TC65 Java Users GuideV05 26.09.2005 Example Eclipse Project importEclipse Example Compile and debug Eclipse Create packageEclipse Configuration BreakpointsJava Security Secure Data Transfer ModeAsja Vasecuritycertificate J a va C u r i t y c e r t i f i c a t eCreate a Secure Data Transfer Environment Step by Step Create CA and generate CA Root CertificateUnsecured mode Secured modeExecution Control Change to Secured Mode Concept Build binary data for AT command AtsjsecGenerate key pair Generate customer root CertificateConcept for the Signing the Java MIDlet Encoded JAR-File HashStructure and Description of the Java Security Commands Application and Data ProtectionStructure of the Java Security Commands General structureBuild Java Security Command Hash SHA1Send Java Security Command to the Module ATSJSEC?Create Java Security Commands Export X.509 Root CertificateCommand switch off module exchange functionality Sign a MIDletUsing the AT Command API Class ATCommandJava Tutorial Instantiation with or without CSD SupportSending an AT Command to the Device, the send Method Data ConnectionsTC65 Java Users Guide ATCommandResponseListener Interface Non-blocking ATCommand.send MethodSynchronization ATCommandListener Interface ATEventsImplementation Registering a Listener with an ATCommand Instance Programming the MIDlet ThreadsExample TC65 Java Users Guide Differences from the TC45
Related manuals
Manual 123 pages 53.3 Kb