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. help me pls example ng c++ program code using do
View Tutorial          By: diana bernardo at 2010-10-15 23:34:19

2. can any plz tell me how to create a calculator in
View Tutorial          By: sam at 2010-11-13 06:53:04

3. It can be Made Popular by adding Links or Suggesti
View Tutorial          By: Ramalingam at 2010-03-20 23:00:41

4. how to execute all these five programms tell me st
View Tutorial          By: shweta at 2008-09-24 07:35:22

5. javax.comm.NoSuchPortException
at javax.co

View Tutorial          By: nikhil at 2009-07-22 05:58:55

6. thanx allot its a very good sample , but im trying
View Tutorial          By: Waleed Qaffaf at 2011-06-09 09:37:15

7. very good explanation... thnx...
View Tutorial          By: gobu at 2009-04-05 23:43:19

8. very good tutorial
View Tutorial          By: Anonymous at 2009-06-13 01:14:25

9. Hi, it looks great!
I'm just starting with

View Tutorial          By: Bertrand at 2013-04-28 19:20:42

10. i want to do a program by using convertView with e
View Tutorial          By: Shahana Akter at 2014-09-11 07:34:43