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


Schneider Electric Energy Server EBX510 Server For Energy Management- picture

Schneider Electric Energy Server EBX510 Server For Energy Management-

$4350.00



FANUC Server Driver A06B-6077-H111 picture

FANUC Server Driver A06B-6077-H111

$2158.86



FANUC Server Driver A06B-6117-H211 picture

FANUC Server Driver A06B-6117-H211

$3993.99



NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0 picture

NEW MOXA NPort 6450 Secure Terminal Server , NPort 6450/US , V1.8.0

$179.99



Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM picture

Server SE-SS 07020 Server Express Single Drop-In - NEW - COMPLETE - Genuine OEM

$180.00



USA Windows VPS Server / RDP Server / VPS Hosting 12GB RAM 400GB HDD 12 Month picture

USA Windows VPS Server / RDP Server / VPS Hosting 12GB RAM 400GB HDD 12 Month

$335.00







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