Results 1 to 8 of 8
  1. #1
    kazuma_riku73 is offline Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0

    Default Urgent! Need help for my final year project!!

    i'm doin my final year project.
    its regarding using J2ME retrieving the IMEI from sony ericsson phone.

    anyone would be kind enough to show me a sample? thank you.

  2. #2
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    System.getProperty("com.sonyericsson.imei");

  3. #3
    kazuma_riku73 is offline Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0

    Default

    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){}
    }

  4. #4
    kazuma_riku73 is offline Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0

    Default

    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..

  5. #5
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    //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);

    }

  6. #6
    kazuma_riku73 is offline Member
    Join Date
    Dec 2008
    Posts
    5
    Rep Power
    0

    Default

    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..

  7. #7
    dswastik is offline Senior Member
    Join Date
    Dec 2008
    Location
    Kolkata
    Posts
    282
    Rep Power
    6

    Default

    I tried the same code, it worked fine, tough to say wats going wrong at your end.

  8. #8
    berkeleybross's Avatar
    berkeleybross is offline Senior Member
    Join Date
    Feb 2010
    Location
    England
    Posts
    187
    Rep Power
    5

    Default

    If it was a straight copy paste you may want to remove the space in sonyericss on :)

Similar Threads

  1. GUI Final Project help
    By Unknown in forum New To Java
    Replies: 21
    Last Post: 12-30-2008, 07:58 PM
  2. [SOLVED] is final class members are also final ?
    By haoberoi in forum New To Java
    Replies: 4
    Last Post: 11-10-2008, 03:01 PM
  3. Leap Year Program
    By busdude in forum New To Java
    Replies: 3
    Last Post: 10-16-2008, 03:46 AM
  4. help to complete final part of project
    By dirtycash in forum New To Java
    Replies: 6
    Last Post: 12-31-2007, 06:21 AM
  5. Merry Christmas and happy New year
    By rgbosque in forum Forum Lobby
    Replies: 3
    Last Post: 12-31-2007, 02:44 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •