BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 07-16-2009, 05:16 AM   #1 (permalink)
New Member
 
s.selva's Avatar
 
Join Date: Apr 2009
Model: 8300
PIN: N/A
Carrier: Orange
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question SMS Editor - Get a context null

Please Login to Remove!

Hello !

I'm using the 4.6.1 JDE and trying to get all information after a user write a SMS before sending it. I set a new MenuItem like that :

Code:
ApplicationMenuItemRepository.getInstance().addMenuItem(
                ApplicationMenuItemRepository.MENUITEM_SMS_EDIT, new SendSMS(30)
        );
I've a class "SendSMS" where i get the context of the SMS Editor :

Code:
private class SendSMS extends ApplicationMenuItem{
        
        public SendSMS(int order){
            super(order);
        }
        
        public String toString(){
            return "Send SMS Like Me";    
        }

        public Object run(Object context) {
            TextMessage tm = null;

            try{
                if(context instanceof TextMessage){
                    System.out.println("It's a TextMessage Class !");
                    tm = (TextMessage) context;
                    System.out.println("Message : " +tm.getPayloadText());
                    System.out.println("Number phone : "+tm.getAddress());
                }
             }
        }
}
After I write a SMS and clik on "Send SMS Like Me", I don't have any information i wrote in the SMS Editor.

Code:
Console :

It's a TextMessage Class !
Message : null
Number phone : null
Do someone know that problem and have a solution ?
__________________
Enseigne l'ignorant et écoute le savant: Tu apprendras ce que tu ignorais, Et tu te rappelleras ce que tu savais...
Offline  
Old 09-10-2009, 04:24 AM   #2 (permalink)
New Member
 
s.selva's Avatar
 
Join Date: Apr 2009
Model: 8300
PIN: N/A
Carrier: Orange
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Up !?!
__________________
Enseigne l'ignorant et écoute le savant: Tu apprendras ce que tu ignorais, Et tu te rappelleras ce que tu savais...
Offline  
Old 09-10-2009, 07:42 PM   #3 (permalink)
BBF Spam Killer Moderator
 
daphne's Avatar
 
Join Date: May 2007
Location: on a sunny beach
Model: Z
OS: 10.2.1.12
PIN: X1ZPY34K
Carrier: VZW
Posts: 9,165
Post Thanks: 122
Thanked 146 Times in 116 Posts
Default

Are you a developer or a BES admin? I don't understand your question, but I think you have posted in the wrong section to get the help you need.
__________________
Report spam text messages to 7726
#BlackBerry by choice #BlacBerry 10 is here!

Last edited by daphne : 09-10-2009 at 07:44 PM.
Offline  
Old 09-11-2009, 04:30 AM   #4 (permalink)
New Member
 
s.selva's Avatar
 
Join Date: Apr 2009
Model: 8300
PIN: N/A
Carrier: Orange
Posts: 8
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I'm a developer.
My problem : In the SMS editor of BlackBerry, i can't get anything with these functions of RIM library (4.6.1 and +) : TextMessage.getAddress(), TextMessage.getPayloadText()
__________________
Enseigne l'ignorant et écoute le savant: Tu apprendras ce que tu ignorais, Et tu te rappelleras ce que tu savais...
Offline  
Old 09-11-2009, 12:38 PM   #5 (permalink)
BBF Spam Killer Moderator
 
daphne's Avatar
 
Join Date: May 2007
Location: on a sunny beach
Model: Z
OS: 10.2.1.12
PIN: X1ZPY34K
Carrier: VZW
Posts: 9,165
Post Thanks: 122
Thanked 146 Times in 116 Posts
Default

Please post in the Developer Forum. I will move this thread, but in the future please post in the appropriate forum and you will have a much better chance of getting help.
__________________
Report spam text messages to 7726
#BlackBerry by choice #BlacBerry 10 is here!
Offline  
Old 09-11-2009, 01:18 PM   #6 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

Unfortunately, this "null context" issue is all over the place. We have reported more than a dozen inconsistencies with "null context". Even worse, a particular function will be broken on 4.3, fixed on 4.5, then broken again on 4.6.

I have found that the "VIEW" SMS works consistently, but the "EDIT" SMS is broken on several releases (as you have discovered).
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





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