Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instanceof TextMessage

 
Steve Heasman
Greenhorn
Posts: 3
Java Java ME Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Vijay Dogra
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not see anything wrong in your code, unless the imports are not proper.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic