Welcome!

Welcome to the Official BlackBerry Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Developer
savi
Posts: 184
Registered: ‎10-28-2009

get address of specific sms after select

hi All

 

how i can get address of specific sms after select?

 

regards

savi

Please use plain text.
Developer
simon_hain
Posts: 13,830
Registered: ‎07-29-2008
My Carrier: O2 Germany

Re: get address of specific sms after select

what do you mean with select? in the message window on the blackberry you could only retrieve it using an applicationmenuitem and its context.

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Please use plain text.
Developer
mbasheerk
Posts: 268
Registered: ‎02-02-2009

Re: get address of specific sms after select

TextMessage sms

String phoneNumber = sms.getAddress();

Please use plain text.
Developer
savi
Posts: 184
Registered: ‎10-28-2009

Re: get address of specific sms after select

how i can reterive it using applicationmenuitem?

 

i have added one menu in custom menus.if i select specific sms and click on my added menu then address of that sms should come...can you guide me?

 

savi

Please use plain text.
Developer
mbasheerk
Posts: 268
Registered: ‎02-02-2009

Re: get address of specific sms after select

public class smsMenu extends ApplicationMenuItem{

    public MessageMenuItem(int order)
    {
        super(order);
    }

   public Object run(Object context)
  {
        if(context instanceof TextMessage){

        TextMessage sms = (TextMessage)context;
        String phoneNumber = sms.getAddress();
        String Body = sms.getPayloadText();
         Date receivedDate = sms.getTimestamp();

  }

}

Please use plain text.
Developer
savi
Posts: 184
Registered: ‎10-28-2009

Re: get address of specific sms after select

hi.....

 

this is code is working but how i can check in simulator?can you tell me any idea?

how i can check through  simulator?

 

savi

Please use plain text.
Developer
savi
Posts: 184
Registered: ‎10-28-2009

Re: get address of specific sms after select

 

 

thanks you , finally i got it..

 

 

kudos for you :smileyhappy:

 

savi

Please use plain text.