Troubleshooting guide

Activate synchronization when the BlackBerry device starts...........................................................89
Code sample: Letting the BlackBerry Desktop Software back up and restore application data 89
5 Using smart cards...............................................................................................................................................97
Smart cards......................................................................................................................................................97
Adding support for unsupported smart cards.....................................................................................97
Creating a smart card driver .........................................................................................................................97
Create a smart card object.....................................................................................................................97
Code sample: Creating a smart card object ........................................................................................98
Activate libMain() on startup ............................................................................................................... 101
Create a session for the smart card driver.......................................................................................... 101
Code sample: Creating a smart card session ..................................................................................... 101
Create a CryptoToken for private key operations............................................................................. 106
Code sample: Creating a CryptoToken for private key RSA operations........................................ 108
Store the private key file location........................................................................................................ 112
Code sample: Storing the location of a private key file on the smart card ................................... 112
6 Managing memory ............................................................................................................................................ 115
Invoking a garbage collection operation ................................................................................................... 115
Reduce the number of objects ..................................................................................................................... 115
Managing low memory.................................................................................................................................. 115
LMM triggers ........................................................................................................................................... 115
Use the LMM ........................................................................................................................................... 116
Free persistent objects...........................................................................................................................116
7 Creating connections........................................................................................................................................ 117
Fetching data using HTTP or TCP sockets ..................................................................................................117
Explicitly selecting a gateway ...............................................................................................................117
Using the BlackBerry Enterprise Server as an intranet gateway.....................................................117
Using the wireless service providers Internet gateway.................................................................... 118
Use HTTP connections........................................................................................................................... 118
Use HTTP authentication ......................................................................................................................122
Use HTTPS connections ........................................................................................................................125
Use socket connections.........................................................................................................................125
Datagram connections................................................................................................................................. 126
Use datagram connections .................................................................................................................. 126
Using port connections.................................................................................................................................128