Comment on Tutorial - How to Send SMS using Java Program (full code sample included) By Emiley J.



Comment Added by : jainitya

Comment Added at : 2011-05-04 12:26:16

Comment on Tutorial : How to Send SMS using Java Program (full code sample included) By Emiley J.
Hi Ramlak
I am trying to run your code.
I have created a SMSTest.java to get an object for SMSClient
public class SMSTest {
public static void main(String[] args) {
// TODO Auto-generated method stub

String Tonumber = "09560341246";
String msg="hifsdf244";
SMSClient sms=new SMSClient(0);
sms.sendMessage(Tonumber,msg);
}
}

Change the Port number and csca, but anable tosend my SMS and getting error msg as
java.lang.NumberFormatException: For input string: "df244"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Long.parseLong(Long.java:403)
at java.lang.Long.parseLong(Long.java:461)
at Sender.run(Sender.java:159)
at java.lang.Thread.run(Thread.java:619)
Wed May 04 20:59:45 IST 2011:Sender:*** time out at step 6***

If I changed the msg to number as msg=1355244
then I am getting a message as
recipient: 09560341246 message: 1355244
sending ...
messageNo244
Wed May 04 21:09:42 IST 2011:Sender:sent message no:244
but still it did not send any SMS.

Please suggest
Thanks


View Tutorial



Ask a Question

Subscribe to Tutorials

Related Tutorials

Program using concept of byte long short and int in java

Update contents of a file within a jar file

Tomcat and httpd configured in port 8080 and 80

Java File

Java String

Count number of vowels, consonants and digits in a String in Java

Reverse a number in Java

Student marks calculation program in Java

Handling Fractions in Java

Calculate gross salary in Java

Calculate average sale of the week in Java

Vector in Java - Sample Program

MultiLevel Inheritance sample in Java

Multiple Inheritance sample in Java

Java program using Method Overriding

Archived Comments

1. why we use the java in networking and What are the
View Tutorial          By: ali mohammed at 2015-10-11 22:34:36

2. ""this"" is a implicit keyword
View Tutorial          By: Gangireddy at 2012-02-15 08:35:18

3. thanks it is nice
View Tutorial          By: Ajay at 2011-07-22 03:44:05

4. hi, good afternoon
i don,t know how to use

View Tutorial          By: Hemanshu at 2012-01-17 06:49:10

5. Very good explanation along with the example. Can
View Tutorial          By: Divya at 2010-09-21 03:05:10

6. Hi
I tried to use this on a windows 7 32 b

View Tutorial          By: Asela at 2012-01-26 18:35:57

7. To "need help":

String s

View Tutorial          By: Mike at 2010-10-14 20:09:31

8. Excellent. I got stuck in a huge project and was f
View Tutorial          By: Rahul Tiwari at 2010-12-08 22:40:29

9. Enough to understand basic concept.Thanks.
View Tutorial          By: Jyothylakshmy P u at 2012-09-18 05:35:48

10. Hi,

Can we use this fix.php on the

View Tutorial          By: Chriz at 2010-07-05 09:22:57