Java Reference
In-Depth Information
public void commandAction(javax.microedition.lcdui.Command c,
javax.microedition.lcdui.Displayable d) {
if (c == mExitCommand) {
if (!mSender.isSending()) {
destroyApp(true);
notifyDestroyed();
}
} else if (c == mRedCommand) {
String dest = mNumberEntry.getString();
if (dest.length() > 0)
mSender.sendMsg(dest, mAppID, RED_IMAGE);
} else if (c == mBlueCommand) {
String dest = mNumberEntry.getString();
if (dest.length() > 0)
mSender.sendMsg(dest, mAppID, BLUE_IMAGE);
}
}
protected void destroyApp(boolean param) {
mEndNow = true;
try {
conn.close();
} catch (IOException ex) {
System.out.println("destroyApp caught: ");
ex.printStackTrace();
}
}
protected void pauseApp() {
mEndNow = true;
try {
conn.setMessageListener(null);
conn.close();
} catch (IOException ex) {
System.out.println("pausetApp caught: ");
ex.printStackTrace();
}
}
Search WWH ::




Custom Search