• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

sending sms!

 
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi my service number for my phone company is +92300000042 . how do i use this to send sms to a phone nummer
 
Mateen Dar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have read about the wma form java. could u please give a small example. thanks
 
Mateen Dar
Ranch Hand
Posts: 55
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
String addr = "sms://" + destination;

MessageConnection sender = null;

try {

try {

//connection creation

sender = (MessageConnection) Connector.open(addr);

//message creation

TextMessage msg = (TextMessage) sender.newMessage(MessageConnection.TEXT_MESSAGE);

//message is load

msg.setPayloadText(message);

//send it

sender.send(msg);



} finally {

sender.close();



}

} catch (Exception ex) {

//handle exception

}





what format must the destination be in .. i have a service number a port and a phone number ...
reply
    Bookmark Topic Watch Topic
  • New Topic