BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 07-15-2009, 04:28 AM   #1
misty83
Thumbs Must Hurt
 
Join Date: Jan 2009
Model: 7100T
PIN: N/A
Carrier: -
Posts: 73
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



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Dental Orthodontic Niti Open Coil Spring Spool .008/010/012/014 Inch 914mm picture

Dental Orthodontic Niti Open Coil Spring Spool .008/010/012/014 Inch 914mm

$74.79



AC HVAC Coil Cleaning System Automotive Pressure Washer Machine 145 PSI w/Hose picture

AC HVAC Coil Cleaning System Automotive Pressure Washer Machine 145 PSI w/Hose

$155.99



Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE picture

Ignition Coil for Ford Tractor 12V 2000 3000 4000 5000 Naa600 800 1965 & Up D5TE

$26.38



VEVOR 3/4

VEVOR 3/4" - 500' coil-BLUE Certified PEX Tubing Htg/Plbg/Potable Water

$168.99



1100-0541 6 Volt Ignition Coil for Ford Tractor 2N 8N 9N Front Mount 9N12024 picture

1100-0541 6 Volt Ignition Coil for Ford Tractor 2N 8N 9N Front Mount 9N12024

$27.36



8536SD01S Square D NEMA Size 2 Motor Starter 120V Coil *NEXT DAY OPTION* picture

8536SD01S Square D NEMA Size 2 Motor Starter 120V Coil *NEXT DAY OPTION*

$283.32







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