• 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

J2ME need to find out if a package exists

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello! I'm newbie to Java, I need to find out if a mobile phone is able to send SMS.. I think the most logical way is to check the version of WMA package on the device. So how can I do it?
Or may be you know other ways to learn this?
 
ranger
Posts: 17347
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"Naugrom"

Please click on the My Profile link above and change your display name to meet the JavaRanch Naming Policy of using your real first and real last names.

Thanks

Mark
 
Ilnur Galimzyanov
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does anybody know?
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you should have some trouble if your MIDlet if it runs on a non-WMA device and your code references WMA classes (because the device does not have support for it).


I think class verification will fail on MIDlet startup if you do it.
You must patch the MIDlet build not to include WMA related code
when the target device does not support WMA.

Anyway a simple way to check if SMS is supported is trying to open a SMS connection with Connector.open(). If ConnectionNotFoundException is thrown you know SMS is not supported.
[ October 19, 2006: Message edited by: Eduardo Marques ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic