×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Jan 2007
    Posts
    9

    How to get a phone number in MIDP platform!

    Hi. all
    How can i get a phone number in MIDP platform?

    i know I must use "System.getProperty()" in MIDP to get phone number.
    But I don't know yet how to use this function.

    please let me know a way to use it.

  2. #2
    Regular Contributor
    Join Date
    Sep 2006
    Location
    Delhi
    Posts
    77

    Re: How to get a phone number in MIDP platform!

    What do you mean by phone number

    If it is handset model u can get it by System.getProperty("microedition.platform")

    If it is SIM number, its not possible to acees in j2me.

  3. #3
    Registered User
    Join Date
    Jan 2007
    Posts
    9

    Re: How to get a phone number in MIDP platform!

    Quote Originally Posted by sunil_talent
    What do you mean by phone number

    If it is handset model u can get it by System.getProperty("microedition.platform")

    If it is SIM number, its not possible to acees in j2me.
    thanks for your answer! sunil_talent!

    um.. what i asked to you is the problem that i was faced with while i did platform porting from SK-VM to MIDP platform.

    and the following fuction is made for getting a Phone number on SK-VM platform.


    public String getPhoneNumber()
    {
    String carrier = System.getProperty("m.CARRIER").toUpperCase();
    String phoneNumber = null;

    if(System.getProperty("m.VENDER").toUpperCase().equals("LG") &&
    System.getProperty("m.MODEL").equals("56"))
    {
    phoneNumber = System.getProperty("MIN");

    if(phoneNumber.charAt(0) == '0') {
    phoneNumber = phoneNumber.substring(3);
    }else{
    phoneNumber = phoneNumber.substring(2);
    }
    }else{
    phoneNumber = System.getProperty("m.MIN");
    }

    if(carrier.equals("SKT")) {
    phoneNumber = "011" + phoneNumber;
    } else if(carrier.equals("STI")) {
    phoneNumber = "017" + phoneNumber;
    } else if(carrier.equals("KTF")) {
    phoneNumber = "016" + phoneNumber;
    } else if(carrier.equals("HSP")) {
    phoneNumber = "018" + phoneNumber;
    } else if(carrier.equals("LGT")) {
    phoneNumber = "019" + phoneNumber;
    } else if(carrier.equals("010")) {
    phoneNumber = "010" + phoneNumber;
    } else {
    phoneNumber = carrier + phoneNumber;
    }

    return phoneNumber;
    }

    up to now, I don't know who will be vender, what number phone will get.
    but I know my application will be loaded on the phone that is used in Europe.
    So, when I must make a application compatible with MIDP platform and European venders, how can i use the function- System.getProperty()?

    thanks.
    Seung hee from KOREA

  4. #4
    Registered User
    Join Date
    Mar 2007
    Posts
    5

    Re: How to get a phone number in MIDP platform!

    The telephone does not know it's own phone number. So therefore it's impossible to get in in any software in the phone.

    However, it's possible that the mobile operation saves the phone number on the SIM card. But that is then not updated if the phonenumber changes. Most operators therefor does not store the number in the SIM card.

    Sad, but true.

Similar Threads

  1. IMEI / Serial number / Phone number
    By mreaves in forum Mobile Java General
    Replies: 15
    Last Post: 2009-04-28, 12:36
  2. WML & WMLSCript problem ????
    By gemini_shooter in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-14, 06:02
  3. WML & WMLSCript problem ????
    By gemini_shooter in forum Browsing and Mark-ups
    Replies: 0
    Last Post: 2006-01-14, 06:01
  4. Find Phone Number in Message View programatically. S60
    By avowkind in forum Symbian User Interface
    Replies: 0
    Last Post: 2004-08-18, 16:23
  5. Own Phone Number
    By rrrs in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2004-06-28, 17:51

Posting Permissions

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