• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Devaka Cooray
Saloon Keepers:
  • Ganesh Patekar
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • salvin francis
Bartenders:
  • Ron McLeod
  • Frits Walraven
  • Pete Letkeman

sending SMS in j2me  RSS feed

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
I am using the following code to send SMS in my application. It does work, but it returns FALSE when the message is really sent successfully.
What do you think is causing the problem?



Thank you!
 
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You set your boolean result to true, and it should return true, but look where your result can be set to false: in the catch statement of your try-catch block.

Something is throwing an exception, but what? I don't know. Your catch block has the superclass Exception in it -- it will catch everything, and set your result to false, but not tell you which thing is breaking.

you should check the Java ME API for the details on those methods you are calling. At least one of them is throwing a specific type of Exception that you could test for.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!