This week's book giveaway is in the JDBC forum.
We're giving away four copies of Make it so: Java DB Connections & Transactions and have Marcho Behler on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Telephone Number format in WMA Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Telephone Number format in WMA" Watch "Telephone Number format in WMA" New topic

Telephone Number format in WMA

Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226

I have some ambiguity about the number format used in (MessageConnection)

destination will have the telephone number as well with PORT and sms://

the problem is there only with the telephone number...

Consider the following...


00-international access code
94- country code (Sri Lanka)
77 - infact 077 the telco
the rest is the subscriber number

what are the possible ways to represent the above in the destination string..

In fact i wont to have a uniform way when handling this for a local(0772123454) number or international one 009477-2123454

how about the + sign in front...?

can we use the international format when sending to a local number?

will it work if we follow this way 0094772123454?

Theepan Thevathasan
SCJP 1.4, SCWCD 1.4, SCMAD 1.0 SCBCD 1.3, MCP(.Net Frm 2.0 App Dev Fdn)
Pradeep Gudipati

Joined: Mar 09, 2006
Posts: 16
no put in the number as follows

xxx is the subscriber number

no need for 00 (international calling)

e.g :
if you want to send an sms to a number from another country say india
the number would be


where +91 country code
080 local bangalore code
37382829 some subscriber number

Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Thanks Pradeep..

That was helpful
Eduardo Marques
Ranch Hand

Joined: Feb 19, 2005
Posts: 231
I don't know if this addresses what you've asked, but let me add the difference between specifying a port and not is relevant.

If you do not state the port then you are addressing a remote phone's SMS/MMS inbox but MIDlets on the remote side won't have access to it at least through the WMA API.

When a port is part of the address , it may be read by MIDlets using WMA in the remote phone. Note also that some ports may be reserved or blocked.
[ April 01, 2007: Message edited by: Eduardo Marques ]

Eduardo Marques
Get ready for your SCMAD certification at - See what all the buzz is about ...
Deepan Devadasan
Ranch Hand

Joined: Jan 25, 2007
Posts: 226
Hi Marques...

Though it was not what i was referring, your comment will be useful to others in future...

You were correct...

Sending the SMS without specifying the port will reach the default, OEM/Native sms application on the target mobile device...
I agree. Here's the link:
subject: Telephone Number format in WMA
It's not a secret anymore!