Sending SMS?

Hi,1.Is it possible using J2ME to send to any mobile number's inbox just like any normal SMS.2. Is it must to know the port number for the cell no in order to send SMS?Many thanksAhmad
[220 byte] By [Ahmad_Khana] at [2007-11-26 13:29:22]
# 1
Hi dear AhmedFor send / receive SMS you should use "WMA JSR 120" but this jsr is not supported in all phones. you can search the web and find the usage of this jsr.Best RegardsSasan YavariMessage was edited by: SasanYavari
SasanYavaria at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 2

Thanks,

I have put up the below code which runs fine on the simulator but throws IllegalArguementException on my phone set(Nokia 7610). There are no message associated with the exception (e.getMessage() returns no msgs).

It is able to execute Connector.open(addr) but fails afterwards.

Thanks.

Ahmad

public void run()

{

String addr = "sms://966504653891";

MessageConnection sender =null;

try{

sender =

(MessageConnection)Connector.open(addr);

TextMessage msg = (TextMessage)sender.newMessage(MessageConnection.TEXT_MESSAGE);

//msg.setAddress(addr);

msg.setPayloadText("Data msg test");

sender.send(msg);

Alert a = new Alert("success...");

a.setTimeout(2000);

dis.setCurrent(a);

}catch(Exception e){

Alert b = new Alert("Error",e.toString(),null,AlertType.ERROR);

b.setTimeout(5000);

dis.setCurrent(b);

//sender.close();

}

Ahmad_Khana at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 3
Did you add the permissions at JAD file?
Ashish_Javaa at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 4
There is some problem with my phone model (Nokia 7610), I tried the same app on Nokia 6680 it worked smoothly.Ahmad
Ahmad_Khana at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 5

Hi Dear Ahmed

Did you have anything like Image etc. in your application? some of the phones does not support all standards for resources. this error hapens when the phone standards has a problem with your app. this is not a public error and just happens sometimes on some special phones.

Thanks

Sasan Yavari

SasanYavaria at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...
# 6
Sasan,Thanks, there are no images. I found the problem to be with the carrier; after changing my SIM to a different carrier it worked smoothly on 7610 as well.Many thanksAhmad
Ahmad_Khana at 2007-7-7 20:33:37 > top of Java-index,Java Mobility Forums,Java ME Technologies...