Java Reference
In-Depth Information
protected void destroyApp(boolean param) {
try {
mEndNow = true;
conn.close();
} catch (IOException ex) {
System.out.println("destroyApp caught: ");
ex.printStackTrace();
}
}
protected void pauseApp() {
}
protected void startApp() {
if (mForm == null) {
mForm = new Form("SMSMIDlet");
mNumberEntry = new TextField("Connect to:",
null, 256, TextField.PHONENUMBER);
try {
mImages[0] = Image.createImage("/red.png");
mImages[1] = Image.createImage("/blue.png");
waitImage = Image.createImage("/wait.png");
} catch (Exception ex) {
System.out.println("startApp caught: ");
ex.printStackTrace();
}
mColorSquare = new ImageItem(null, waitImage,ImageItem.
LAYOUT_DEFAULT, "colored square");
mForm.append(mNumberEntry);
mForm.append(mColorSquare);
mForm.addCommand(mExitCommand);
mForm.addCommand(mRedCommand);
mForm.addCommand(mBlueCommand);
mForm.setCommandListener(this);
}
Display.getDisplay(this).setCurrent(mForm);
startReceive();
}
private void startReceive() {
if (mReceiver != null)
return;
Search WWH ::




Custom Search