Is an object contained in an array?

Most of the traditional ways to see if an object is contained in an array in Java require the use of sets and generics. However, generics were not included in Java until version 1.5, while the Java that runs on the BlackBerry OS is based off of J2ME, which is based off of version 1.4 of Java. As such a different approach needs to be used to determine if an object is in an array when coding for BlackBerry. While you could (of course) write your own method using a for loop, there is an easier way.

import net.rim.device.api.util.Arrays;

String[] nameArray = new String[]{"John","Paul","George","Ringo"};
String testValue = "Paul";


While this examples uses an array of strings, this approach will in fact work for any Object type.

Hockey app updated for start of the season

The Hockey Scores app has been updated to version 2.8 in order to accommodate the start of the 2011-2012 season. Without updating the app will not correctly show the games for the new season. This update also increases the font size on the new Bold 9900/9930 devices.

About Hockey Scores

This application provides the day’s hockey scores is an intuitive and easy to use format. It also includes additional game statistics such as start times, goal scorers, shots on net, hits, faceoff percentage, team Corsi numbers, and the goal scorers. Additionally the app supports keyboard shortcuts for easy navigation, and a number of display options. All BlackBerry devices with OS 4.6.0 and higher are supported.

Links & Information

Twinkle version 3.2 released

Twinkle has been updated to version 3.2 in BlackBerry AppWorld. This new version includes additional ways to import events, some stability improvements, and a way to bulk import existing events.

About Twinkle

Twinkle is a simple application that allows you to set and keep track of upcoming and past events. Twinkle will tell you how far away an event is, and allows you to send events to and from your BlackBerry’s native calendar, or to your friends on BBM. Twinkle gives you the ability to add and edit events, lets you keep track of how soon something is, or how long it has been since an event, and to search for all of these events through BlackBerry’s universal search. In recognition of this deep integration with the device, Twinkle was named a Regional Selections Winner in the 2010 BlackBerry Super Apps Challenge.

New in version 3.2

Version 3.2 makes it easier to import existing calender events into Twinkle. In addition to having the “Add to Twinkle” menu option when you highlight an event on the calendar, the “Add to Twinkle” menu option is now also available when you have opened the event itself.

Furthermore in the option page of Twinkle there is an option to “Import all from Calendar” (as seen to the right). This option allows you to add every single existing BlackBerry calender event to Twinkle. It is important to note that this is a bulk import feature, and NOT a sync feature. It will import all of your existing calender events even if they have already been added before.

Links & Information