How to get out the address book?

When I choose a contact, I can return to the editField interface and as SUCH get set to the editField,

but now if I didn't chosse contact, I want to return to the editField interface, it shows Nullpointer Exception.

so, how can I get out of address book?

showAddressBook my code:

public void showAddressBook() {}
try {}
Contact list BlackBerryContactList = (BlackBerryContactList) BlackBerryPIM.getInstance () .openPIMList (BlackBerryPIM.CONTACT_LIST, BlackBerryPIM.READ_WRITE);
Contact BlackBerryContact = (BlackBerryContact) contactList.choose (null, BlackBerryContactList.AddressTypes.EMAIL, true);
  
Portable chain = "";
int numValues = 0;
numValues = contact.countValues (BlackBerryContact.TEL);
  
for (int i = 0; i)< numvalues;="" i++)="">
If (contact.getAttributes (BlackBerryContact.TEL, i) == BlackBerryContact.ATTR_MOBILE) {}
Cell = contact.getString(BlackBerryContact.TEL, i);
break;
}
}
         
editField.setText (mobileNumber);
} catch (PIMException ex) {}
ex.printStackTrace ();
}
}

If the user decides to not choose a contact, you get null as a return value. your code should check this.

Tags: BlackBerry Developers

Similar Questions

  • How to get out the mode safe mode with msconfig.

    I'm working on my computer and need to start in safe mode. I ran the msconfig and reboot the laptop. I get to the login screen, but when I get my username and password it tells me that the user name and password is not correct. How to get out the mode safe mode with msconfig.

    When you run msconfig to get set to Safe Mode, you just activate/check the option/SafeBoot at startup. INI tab or did you do something else?

    There is some malware that if you use the/SafeBoot option, you will not be able to use your system again until you remove the switch/SafeBoot the boot.ini for you can boot normally.

    Maybe it's not your exact problem, but I will never suggest to anyone to use the option / SafeBoot never again - too risky when troubleshooting since you can always start new or will never connect again until you remove the switch/SafeBoot.

    Anywho, if that's what you have done, you can start in the XP Recovery Console and then either make a new boot.ini file containing the switch/SafeBoot or simply rename the boot.ini file, you have something like boot.ini.old if you don't have a boot.ini file (I know it seems like a weird idea).

    In a single partition configuration, XP is not even a file boot.ini to boot.  XP will complain if there is no boot.ini file, but will always start very well without one (non-believers - try it!).

    After you get booted up and logged in, you can rename boot.ini.old in boot.ini and run msconfig to remove the option/SafeBoot, and never use it again.

  • How can I remove the address book 8600plus email address

    HP 8600 more how can I remove an email address from the address book?

    The best way I found was in the SAP. Go to the icon on the printer wireless and get the ip address of the printer. Do IP in the address bar of your web browser and you will get a page of the printer settings. On the left you should see out e-mail profiles, once you click you should get address book on the left.

  • My motherboard has exploded and I have the hard drive. How can I copy the address book for a new installation on a new computer from the old hard drive?

    I have the old hard drive in a USB enclosure and connected to the computer again. I have installed firefox and you need to have the address book (critical) copied and inserted information from address book on the new computer. I hope that there is a file I can replace easily?

    Firefox send an e-mail, it's strictly a web browser.

    If you use Firefox to access your e-mail, you use "webmail". You must seek assistance from your service provider or a forum for this service.

    If your problem is with Mozilla Thunderbird, check out this forum for support.
    https://support.mozillamessaging.com/.../home

    or this one

    http://forums.mozillazine.org/viewforum.php?f=39

  • How have I not the address book displayed on the writing page

    For some reason, I can't address book to show when I'm in the writing window. If I start typing the address he will give me a choice of names in the address book, but I can't seem to appear when I type.

    When you open window writing press F9 to display the sidebar for Contact. F9 will toggle it on and outside.

  • How to get out the year following the date

    Hi all

    I'm couldn't get out of the year to date.
    in my table it has been stored in varchar format on January 11, 2005
    If I want to display the year of the column, then
    I tried with year (to_date (' ' jan 11 2005 ', ' mm dd yyyy ' "))
    but I get an error then, how should I go out the year of the date_column

    thnks

    Hello

    Use RIGHT(DATE_COLUMN,4)

    Thank you
    Saichand.v

  • How can I recover the address book from a previous installation?

    I had to reinstall Thunderbird on my PC. When I did, all my previous entries to address book are missing. Is it possible to recover?

    As I remember, I just reinstalled T-bird. It came with a clean slate; no address, no favourites, as if it was installed for the first time. I was told that this info is stored somewhere, I don't know where to look.

  • How can I copy the address book Thunderbird from Windows to Ubuntu?

    I use Windows on a Pc 8.1 and 14.04 Ubuntu on the other.

    Thanks in advance for your help

    Best regards

    EP

    I think the best way is to export address books needed of the LDIF files on the first machine and import the LDIF files on the second machine.

    Alternatively, you can copy the files from *.mab data from one machine to the other. Two default address books are represented by abook.mab and history.mab and can be simply copied. Other user-defined address books will be designated as abook1.mab etc. and will have to be imported. I'd say MoreColumnsForAddressBook for this task.

  • How to get out the white on black high contrast?

    How to get white on black high contrast for my Firefox screen?

    This has happened

    Each time Firefox opened

    Is yesterday. I closed and then later opened Firefox and got the high-contrast display.

    See also;
    Website colors are not
    Web sites look bad or display differently they should

  • How to get out the widget from a remote php file

    I want to leave the remote one froma widget php file, I use the onExit

    function trapForApplicationExit()
      {
          blackberry.app.event.onExit(handleExit);
      }
    
      function handleExit()
      {
             var answer = confirm("Leave this application?");
             if (answer)
               blackberry.app.exit();
      }
    

    who needs to add the function blackberry.app.event in my config.xml file, the question is how can I add this feature to the remote files on the server?

    In your config.xml file where you have in your external domain name whitelist, you will also want to add the feature as an element element nested.

    For example:

    http://www.mydomain.com" subdomains="true">
      
    
    

    This will allow the API run in the external domain.

  • How to get out the sections as separate Web pages user guide?

    I have a guide of heavy use (MS Word file) which has several sections and subsections (e.g., 1.2, 1.2.3 etc.). When I pulled out using Webhelp, Responsive HTML5 or any other SSL, the guide is published under a long Web page. I can use the table of contents to access certain sections, but I can of course scroll upwards or downwards for other sections. Is there a way to isolate and each section as well as a separate page, while keeping the table of contents complete?

    It would be extremely tedious to split the Word file, then import them individually into Robohelp...

    I am very new to Robohelp, so any help is very appreciated! Thank you!

    I moved this post to the RoboHelp for Word forum, existing links will continue to work. RoboHelp for Word is a separate product that no longer ships with RoboHelp.

    The document can be divided according to the styles then maybe you can set styles to give the breaks you want. On my site, see Importing and creating a binding.

    See www.grainge.org for creating tips and RoboHelp

    @petergrainge

  • Disk with bad sectors - how to get out the data?

    I have a drive that is on its way in my lab at home. He got a few virtual machines on that I'd like back. The SMART State shows a few hundred bad sectors. I use ESXi 5.1 build 799733

    VMS seem to run but when I try to copy them to another disc from the vSphere client, I get a generic error and it hangs on. VMkernel.log displayed I/O failure of questions and 'unexpected sense '.

    I wonder if:

    (1) there is a way to get ESXi try again to copy several times because I think that the copy may succeed after several attempts (given that the VMs system run OK but can not copy them).

    (2) it is possible to run something similar to a chkdsk utility that can be run on the vmfs to see if the file system can recover bad blocks?

    (3), a last resort is it possible to get ESXi to continue with the copy despite IO errors. Maybe then I can run chkdsk inside the BONE and it will heal.

    (4) what are the tools (if any) can I use to clone the drive dying on a well known disc? DD work?

    I agree with the suggestion to try gddrescue.
    The problem THAT VM power off - start a Linux VM from a different data store and get the data store with bad blocks via vmfs-fuse and sshfs.
    Then copy the outside through ddrescue flat.vmdk.

    Sometimes it also helps to manually create a snapshot for the bad VM on another data store. Who sets the origin vmdk in read-only mode.
    Once you have the snapshot you can clone then the empty new snapshot with the basedisk damaged via vmkfstools - i.

  • in Lightroom how to get out the mobile app

    Hi I have CC and in my Lr it shows I am in mobile Lr how to start and I don't know how I got it and I can't

    Return to the page of Lr.

    Hi Geoff,

    Thanks for responding, and when I went to send you the screen that I clicked it and it grew up there correctly.

    Thank you for helping me such a simple thing, the only thing I did not click on.

    Thank you

  • How to get out the show process

    in Vshield when you do a show process or show log how you quit at a command prompt?

    to exit the show process and show log, just press q.

    Manager > show process (enter)

    you will be displayed with console process, just press q to exit.

  • How can I import the address book and my emails from Outlook 2010?

    I use Windows 8.1 and I want to change my Outlook 2010 for Thunderbird, but I don't know how to import data from Outlook to Thunderbird.

    http://en.flossmanuals.NET/Thunderbird/migrating/

Maybe you are looking for

  • Get a message "do not answer." It gets worse every day. Nothing seems to work, including to reset.

    I get this message for weeks. And this is the 3rd time I asked for help with that and nothing works. I think to deserting a ship to Internet Explorer. Can't believe I'm saying it since I was with you guys for years. Please can someone help? Get this

  • VPN configuration blocking Internet connectivity

    I own an iPhone6 (bought in November 14 and another iPad4 (bought in early 2014) - I face a problem even in both devices.) Whenever I'm trying to be devices connecting to the Internet (this either through Mobile or wireless data, I have to take concr

  • Key to malfunction on Satellite A300

    Nice day Yesterday, I bought the laptop Toshiba Satellite A300 and then I installed it, Windows 7 RC1 and now there is a problem. Key which is symbol "Å?" Slovak keyboard for English is "------" in combination with the key shift does not :-( If you p

  • I don't have text very often...

    .. .but I already remember what I was typing there is words being invited to select. I do not see those more. Something has changed, or am I out of my mind?

  • Quad-layer Blu - ray writer info ask 2016-Jan

    Hello, all. DVD burner becomes erratic on a 2009 24 "iMac (10.9.5), and this is another question (blow compressed air w drive, use a cleaning disc, he works for one or two of the data DVD then do not accept a blank DVD, re - clean and repeat; continu