Results 1 to 8 of 8
- 12-24-2008, 04:33 AM #1
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
- 12-24-2008, 12:56 PM #2
Senior Member
- Join Date
- Dec 2008
- Location
- Kolkata
- Posts
- 280
- Rep Power
- 5
System.getProperty("com.sonyericsson.imei");
- 12-26-2008, 04:25 AM #3
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
yar.. i know about the 'System.getProperty' thing..
wad i meant is how to put it in my code.. which part of it..
below is my sample of code..
import javax.microedition.lcdui.*;
import javax.microedition.midlet.*;
public class IMEI extends MIDlet implements CommandListener {
private Display mDisplay;
private Form mTestForm, mForm2;
private Command mCMD_EXIT,mSend;
private TextField mText,mText1,mText2, mText3;
private List implicitList;
public void startApp(){
mCMD_EXIT = new Command("Exit", Command.EXIT, 1);
mSend = new Command("Send", Command.SCREEN,1);
mText = new TextField("IMEI :", "", 15, TextField.NUMERIC);
mText1 = new TextField("Model :", "", 5, TextField.ANY);
mText2 = new TextField("County :", "", 17, TextField.INITIAL_CAPS_WORD);
mText3 = new TextField("Retail ID:", "", 10, TextField.NUMERIC);
mTestForm = new Form("IMEI WARRANTY");
mTestForm.addCommand(mCMD_EXIT);
mTestForm.addCommand(mSend);
mTestForm.append(mText);
mTestForm.append(mText1);
mTestForm.append(mText2);
mTestForm.append(mText3);
mTestForm.setCommandListener(this);
mDisplay = Display.getDisplay(this);
mDisplay.setCurrent(mTestForm);
}
public void commandAction(Command c, Displayable s){
if (c.getCommandType() == Command.EXIT){
notifyDestroyed();
}
else if(c == mSend){
mDisplay.setCurrent(mForm2);
mForm2.setCommandListener(this);
}
}
public void pauseApp(){
}
public void destroyApp(boolean unconditional){}
}
- 12-26-2008, 04:27 AM #4
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
i need it the IMEI to appear automaticately the moment i launch the program..
it should appear like..
IMEI: ********* (something lyke tat)
my lecturer say i need to assign a string for it..but i really dunno how..
pls help me.. thanks alot..
- 12-26-2008, 07:17 AM #5
Senior Member
- Join Date
- Dec 2008
- Location
- Kolkata
- Posts
- 280
- Rep Power
- 5
//you probably need a small change in startApp method, I have placed a comment before that line
public void startApp(){
mCMD_EXIT = new Command("Exit", Command.EXIT, 1);
mSend = new Command("Send", Command.SCREEN,1);
mText = new TextField("IMEI :", "", 15, TextField.NUMERIC);
mText1 = new TextField("Model :", "", 5, TextField.ANY);
mText2 = new TextField("County :", "", 17, TextField.INITIAL_CAPS_WORD);
mText3 = new TextField("Retail ID:", "", 10, TextField.NUMERIC);
//retrieve the IMEI and display
mText.setString(System.getProperty("com.sonyericss on.imei"));
mTestForm = new Form("IMEI WARRANTY");
mTestForm.addCommand(mCMD_EXIT);
mTestForm.addCommand(mSend);
mTestForm.append(mText);
mTestForm.append(mText1);
mTestForm.append(mText2);
mTestForm.append(mText3);
mTestForm.setCommandListener(this);
mDisplay = Display.getDisplay(this);
mDisplay.setCurrent(mTestForm);
}
- 01-05-2009, 08:06 AM #6
Member
- Join Date
- Dec 2008
- Posts
- 5
- Rep Power
- 0
hi, really thanks for your help..
but i still cant work this application..
i paste the code you written..
and i run it in the phone..
it show error msg
applicetion error
i tried finding the error in the code but i cant identify the error..
pls help me.. thank you..
- 01-05-2009, 08:30 AM #7
Senior Member
- Join Date
- Dec 2008
- Location
- Kolkata
- Posts
- 280
- Rep Power
- 5
I tried the same code, it worked fine, tough to say wats going wrong at your end.
- 06-18-2010, 11:48 AM #8
Similar Threads
-
GUI Final Project help
By Unknown in forum New To JavaReplies: 21Last Post: 12-30-2008, 07:58 PM -
[SOLVED] is final class members are also final ?
By haoberoi in forum New To JavaReplies: 4Last Post: 11-10-2008, 03:01 PM -
Leap Year Program
By busdude in forum New To JavaReplies: 3Last Post: 10-16-2008, 03:46 AM -
help to complete final part of project
By dirtycash in forum New To JavaReplies: 6Last Post: 12-31-2007, 06:21 AM -
Merry Christmas and happy New year
By rgbosque in forum Forum LobbyReplies: 3Last Post: 12-31-2007, 02:44 AM


LinkBack URL
About LinkBacks

Bookmarks