BlackBerry Forums Support Community
              

Closed Thread
 
LinkBack Thread Tools
Old 07-15-2009, 04:28 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how can i differ incoming sms from mms?

Please Login to Remove!

hi,
i've implemented MessageListener and i'm wondering why incoming sms is recognized as an mms.. here is my code:
Code:
public class MessageIncoming implements MessageListener{


public void incomingMessage(){

	try{
		_messageConnection = (MessageConnection)
		Connector.open("sms://:0", Connector.READ);
			
            _messageConnection.setMessageListener(this);

		}catch(Exception e){}
		
	}//end of incomingMessage() method


public void notifyIncomingMessage(MessageConnection _mc){

	try{
		
	 _messageConnection.receive();
		
			
	if( _messageConnection instanceof TextMessage ){
	
      Dialog.alert("sms");
				
	}	else{
                     Dialog.alert("mms");	
				
			}
			
		}catch(Exception e){}
		
	}//end of notifyIncomingMessage() method
}
it looks like sms is not always instance of TextMessage..

Does any of You have any idea how can i differ incoming sms from mms?

kind regards
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

SQUARE D Control relay class 8501 type HO60 series C/ED coil 120V, contacts: 6
$65.0
SQUARE D Control relay class 8501 type HO60 series C/ED coil 120V, contacts: 6  pictureCARRIER Part # 06EA-401-313 Solenoid Coil 120V
$15.0
CARRIER  Part # 06EA-401-313 Solenoid Coil 120V pictureNovar IFP-4 120Volts Control Box w/ 4 - Pilot Relay Coils EC/IOM
$59.88
Novar IFP-4  120Volts Control Box  w/ 4 - Pilot Relay Coils EC/IOM  pictureNovar IFP-16 120Volts Control Box w/16 - Pilot Relay Coils EC/IOM
$149.88
Novar IFP-16 120Volts Control Box  w/16 - Pilot Relay Coils EC/IOM  pictureHappybuy Oxygen O2 Barrier PEX Tubing - 2 Rolls of 1/2 Inch X 100 Feet Tube Coil
$68.28
Happybuy Oxygen O2 Barrier PEX Tubing - 2 Rolls of 1/2 Inch X 100 Feet Tube Coil picture






Copyright 2004-2016 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.