BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-08-2008, 12:09 PM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: 8100
PIN: N/A
Carrier: do not know
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default how to get the phone number i want to call

Please Login to Remove!

Dear all:
I am a beginner blackberry developer and I met a problem: I have inserted a menu into addressbook from my own bb application , then I want to get the phone number which I have selected and add a special prefix numer before I make an outgoing call. Which method I can use to get the phoneNumber?
Thanks!
Offline  
Old 04-09-2008, 04:03 AM   #2 (permalink)
CrackBerry Addict
 
Join Date: Apr 2005
Location: hamburg, germany
Model: 8900
Carrier: o2
Posts: 838
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

if you extended ApplicationMenuItem you get a context-object. In case of the adress book it is an instance of BlackBerryContact. Working with BlackBerryContact is a bit difficult but you'll find some examples in the developer guides.

hth,
simon
__________________
java developer, Devinto, hamburg/germany
Offline  
Old 04-12-2008, 02:19 AM   #3 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: 8100
PIN: N/A
Carrier: do not know
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

hi,simon:
you are right,it is really a difficult thing for me. I can only access the ContactList from the first one to the last one,but I do not know how to get just the exact contact which I have selected,do you have any idea of this?
Offline  
Old 04-12-2008, 02:08 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Model: 8800
Carrier: Orange
Posts: 181
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

You can get a phone number with:

Code:
contact.getString(Contact.TEL);
Where contact is a javax.miroedition.pim.Contact, which will be passed to your ApplicationMenuItem.
Offline  
Old 04-14-2008, 06:35 AM   #5 (permalink)
Knows Where the Search Button Is
 
Join Date: Feb 2008
Model: 8100
PIN: N/A
Carrier: do not know
Posts: 22
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks a lot!
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.