Troubleshooting guide
Code sample: Using a raw image to recreate an encoded image....................................................47
Drawing and rendering images ....................................................................................................................48
Position an image....................................................................................................................................48
Draw an image in color...........................................................................................................................48
Using audio.......................................................................................................................................................51
Start the media player from the BlackBerry Browser .........................................................................51
Create a media player..............................................................................................................................51
Play media ................................................................................................................................................54
Listen for media player events...............................................................................................................54
Using rich media.............................................................................................................................................55
Playing rich media content....................................................................................................................55
Code sample: Retrieving and displaying a rich media file................................................................56
Listen for rich media events................................................................................................................... 57
Code sample: Managing rich media content download events .......................................................58
Code sample: Implementing a listener to download rich media content.......................................59
Create a custom connector for rich media connections....................................................................62
Code sample: Implementing a custom connector..............................................................................62
3 Storing data........................................................................................................................................................ 65
Use BlackBerry persistent storage...............................................................................................................65
BlackBerry persistent storage ...............................................................................................................65
Manage persistent data................................................................................................................................ 66
Code sample: Saving user name and password information............................................................67
Manage custom objects ................................................................................................................................ 69
Code sample: Storing and viewing restaurant information...............................................................71
Use the MIDP record store............................................................................................................................ 75
4 Managing data.................................................................................................................................................... 77
Data synchronization ..................................................................................................................................... 77
Types of data synchronization............................................................................................................... 77
Backing up and restoring data...................................................................................................................... 78
Add support for backing up data over the wireless network ............................................................ 78
Access a SyncCollection.........................................................................................................................80
Notify the system when a SyncCollection changes ............................................................................81
Using SyncObjects..................................................................................................................................82
Code sample: Using a SyncCollection to back up data over the wireless network.......................82
Add support for backing up data with the BlackBerry Desktop Software......................................88