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. I made this "In your AndroidManifest.xml file
View Tutorial          By: lalo at 2011-11-20 05:56:43

2. It is very simple and understandable tutorial, the
View Tutorial          By: Syed Turab at 2010-03-09 07:27:15

3. Hi,
I'm studying core java.java is new for

View Tutorial          By: shantkumar at 2011-12-01 17:02:26

4. u said that const function cant change object.can
View Tutorial          By: z at 2010-05-09 12:02:17

5. Showing code with quote tags is pretty rubbish. :/
View Tutorial          By: Daniel Jonsson at 2011-09-01 14:01:04

6. Thankx, the information was of great use, I apprec
View Tutorial          By: sachin at 2008-12-13 03:37:11

7. hello!
I am so confused and a total beginne

View Tutorial          By: Jena at 2011-06-11 17:39:39

8. it is gooo...very helpful to know the basics
View Tutorial          By: srikanth at 2010-08-24 00:38:57

9. hai

Please show ByteAraayOutputStre

View Tutorial          By: WebMayuri at 2010-02-10 22:30:01

10. Good explaination, easy to understand
thank

View Tutorial          By: channaveer at 2010-05-02 05:03:21