File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Instanceof TextMessage" Watch "Instanceof TextMessage" New topic

Instanceof TextMessage

Steve Heasman

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 ?



Steve Heasman - Bsc Computer Science Student, Teesside University
Vijay Dogra

Joined: Sep 16, 2004
Posts: 22
I do not see anything wrong in your code, unless the imports are not proper.
I agree. Here's the link:
subject: Instanceof TextMessage
It's not a secret anymore!