This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get device name and phone number

 
Debojit Nag
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
Could any one of you have any idea about how to get device name,ie, model number,say, Nokia 6255 and phone number. It is needed at runtime.
Thanx in advance.

Debojit
 
James Hodgkiss
Ranch Hand
Posts: 401
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hiya Debojit,

To get the phone make/model, use System.getProperty("microedition.platform").

The only way to get the phone number that I know of is to insert the users phone number into the jad file when the midlet is requested (maybe via a Java servlet) and retrieve it at runtime using MIDlet's getAppProperty() method.

Cheers,
James
 
Debojit Nag
Ranch Hand
Posts: 44
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Thanx a lot. It is working. The phone number van also be found from
System.getProperty(wireless.messaging.sms.smsc),I guess.

Debojit
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic