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



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. @readers
this is an example of Hiding and N

View Tutorial          By: DevJ at 2011-03-18 05:41:52

2. hello everyone... I am getting the error "sms
View Tutorial          By: umar at 2010-12-19 04:20:33

3. very nice tutorial.. keep it up. cheers

View Tutorial          By: chanchal at 2013-01-24 06:54:23

4. Hi Binod,

Since JSP code is execute

View Tutorial          By: Aathi at 2009-05-28 21:20:10

5. very simple and nice examples for begineer...
View Tutorial          By: sarhand at 2010-04-21 00:57:23

6. it would be very helpful if you demonstrated how t
View Tutorial          By: newcoder at 2011-10-24 17:40:25

7. good example tnq...........
View Tutorial          By: SaidiReddy at 2012-06-09 12:03:09

8. hi ..

for second code which impleme

View Tutorial          By: Eng at 2009-02-21 03:53:29

9. This tutorial is really fantastic.It helped me a l
View Tutorial          By: Rakesh Verma at 2008-06-25 13:25:23

10. Hi guys... I try to run the program and I got this
View Tutorial          By: Glatiuden at 2015-01-31 02:42:37