Send SMS

Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2006
Posts: 13
Reputation: usama is an unknown quantity at this point 
Solved Threads: 0
usama usama is offline Offline
Newbie Poster

Send SMS

 
0
  #1
Jul 17th, 2006
Hi All

How i can send SMS by Java Mobile Application.
I want the Class which used.
Thanx

Osama
Reply With Quote Quick reply to this message  
Join Date: Nov 2004
Posts: 6,143
Reputation: jwenting is just really nice jwenting is just really nice jwenting is just really nice jwenting is just really nice 
Solved Threads: 213
Team Colleague
jwenting's Avatar
jwenting jwenting is offline Offline
duckman

Re: Send SMS

 
0
  #2
Jul 17th, 2006
SMS triggered bombs? And asking others to write the software for them?
What'll Al Qaeda think up next...

There are a great many SMS libraries out there for you to purchase (and some may even have a limited functionality free version).
As you obviously didn't even bother researching the subject or you'd have found those yourself you should first do that.
As people are clearly allowed to attack me but I'm not allowed to defend myself, I no longer post to this site.
Reply With Quote Quick reply to this message  
Join Date: Jul 2006
Posts: 1
Reputation: txrajan is an unknown quantity at this point 
Solved Threads: 0
txrajan txrajan is offline Offline
Newbie Poster

Re: Send SMS

 
0
  #3
Jul 18th, 2006
hi
try it with this peace of code



MessageConnection smsconn = null;
smsconn = (MessageConnection) Connector.open(address); String address = "sms://" + phoneNumberField.getString() + ":50000"; // address for sending sms "sms://phno:portno"
MessageConnection smsconn = null;
try {
smsconn = (MessageConnection) Connector.open(address);

TextMessage txtmessage = (TextMessage)smsconn.newMessage(MessageConnection.TEXT_MESSAGE);
txtmessage.setAddress(address);
txtmessage.setPayloadText(messageField.getString());
smsconn.send(txtmessage);

thanks and regards
thiyagu.


Originally Posted by usama
Hi All

How i can send SMS by Java Mobile Application.
I want the Class which used.
Thanx

Osama
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: Send SMS

 
0
  #4
Apr 1st, 2009
Hi jwenting,
Always you are scolding the forum senders. what you think about you man. See if you know the solution for the query, just send it otherwise shut your mouth. Don't give false replies.
otherwise show a good way to solve the problem by themselves.

Don't take it as advice its a humble request.


Share the knowledge don't show your anger...

Hidash..
Reply With Quote Quick reply to this message  
Join Date: Oct 2007
Posts: 85
Reputation: hidash_in has a little shameless behaviour in the past 
Solved Threads: 0
hidash_in's Avatar
hidash_in hidash_in is offline Offline
Junior Poster in Training

Re: Send SMS

 
-1
  #5
Apr 1st, 2009
String phone="123456789";
String message="Hello India,";
String ppgHost= "http://localhost:portno";
try
{
phone=URLEncoder.encode(getMobileId(), "UTF-8");
if(debug)
System.out.println("phone---->"+phone);
message=URLEncoder.encode(getMessage(), "UTF-8");
if(debug)
System.out.println("message---->"+message);
}
catch (UnsupportedEncodingException e)
{
System.out.println("Encoding not supported");
}
String url_str=ppgHost+"?PhoneNumber="+phone+"&Text="+message;

System.out.println("path name---url_str----->\n\n"+url_str);
URL url2=new URL(url_str);
HttpURLConnection connection = (HttpURLConnection) url2.openConnection();
connection.setDoOutput(false);
connection.setDoInput(true);
if(debug)
System.out.println("connection :"+connection);
String res=connection.getResponseMessage();
if(debug)
System.out.println("res :"+res);

int code = connection.getResponseCode () ;
if ( code == HttpURLConnection.HTTP_OK )
{

connection.disconnect() ;

}
System.out.println("Message Sent Successfully");
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,467
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 267
Moderator
masijade's Avatar
masijade masijade is offline Offline
Nearly a Posting Maven

Re: Send SMS

 
0
  #6
Apr 1st, 2009
All that for a three year dead thread?
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



Tag cloud for Java
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC