This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Instanceof TextMessage Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Instanceof TextMessage" Watch "Instanceof TextMessage" New topic
Author

Instanceof TextMessage

Steve Heasman
Greenhorn

Joined: Feb 14, 2011
Posts: 3

Hi Guys

I am hoping someone can see what I cant in this code I have one phone sending a string in a sms to another below is the code for the sending of the text message


Pretty Straight forward the second phone does get the message but at present doesn't see the message as a instance of TextMessage the code for receiving is below


I put some System prints in their to see where it was getting to so i know it fails at if (msg instanceof TextMessage)

Any ideas ?

Thanks

Steve


Steve Heasman - Bsc Computer Science Student, Teesside University
http://www.steveheasman.com
Vijay Dogra
Greenhorn

Joined: Sep 16, 2004
Posts: 22
I do not see anything wrong in your code, unless the imports are not proper.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Instanceof TextMessage