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



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. 1==how can we use vb.net web service data in JSF?<
View Tutorial          By: kumaraswamy at 2009-01-06 23:56:53

2. Very good explaination of transient and volatile.
View Tutorial          By: Himanshu Upadhyay at 2010-11-15 04:48:43

3. Hello guys, the code above is the full complete co
View Tutorial          By: Dalma at 2012-10-03 02:50:33

4. Please send me application for sending message on
View Tutorial          By: jigar at 2011-12-21 11:53:48

5. Quite Helpful.....
^_^

View Tutorial          By: Alfred_Septio at 2012-09-26 12:38:47

6. I made this "In your AndroidManifest.xml file
View Tutorial          By: lalo at 2011-11-20 05:56:43

7. You should give more specification on exactly whe
View Tutorial          By: Abhijit at 2013-03-09 20:14:21

8. nice one
View Tutorial          By: dhusor at 2012-05-08 17:38:50

9. good explanation.
View Tutorial          By: praneeth at 2011-06-20 23:28:00

10. gooooooodddddddd
View Tutorial          By: arya tandon at 2015-02-23 09:08:05