Announcing Java Sample Repositories

Today we are pleased to announce two new repositories of Open Source code for BlackBerry. We have a repository of Java sample code which includes our BlackBerry JDE Samples from the 7.0 SDK, and a repository of samples previously released through our Knowledge Base. Now these popular code samples are available through the Apache Software License 2.0, which allows developers full access to use them in their applications and extend the samples further.

JDE-Samples

If you aren’t familiar with the samples included in the BlackBerry tools, I’d recommend taking a look sometime if there is an API you are curious about. There are 100+ samples included which cover each major API. Our JDE-Samples repository will include these samples for each version of the SDK.

This repository uses Git’s very good support of branches (e.g. see Pro Git’s Chapter 3), to keep the samples for all the JDE releases in the same directory.  For example, the in-device samples for JDE 4.6.1 are here.  There are currently 8 branches, plus the master branch.  There are also 8 tags; one per each of these branches.

Samples-for-Java

Our Samples-for-Java repository includes five sample applications today and we will continue to add more in the future. The massively popular Advanced UI sample, with it’s many containers and components is included. The KB article for this sample shows some example screenshots so you can see what it can do. We’ve also included the Simple Location API, the Titlebar API, and sample apps for Analytics and a YouTube client. Read on for more details on these samples.

Advanced UI: If you have ever wanted to take your UI designs further this is the first place to look. There are several button extensions included, allowing you to use Bitmaps for buttons, or to do Embossed buttons, create hyperlinks and button lists. There are also toggle switches, sliders, ratings, and pill buttons ready to use in your applications. Advanced managers allow you to quickly do new layouts, like justified horizontal and vertical layouts, or 2 column screens. Finally, progress animations and bitmap gauge fields add polish to your UI.

Addional details and more screenshots like the one to the right, in “Implement advanced buttons, fields, and managers“.

Simple Location API: Using GPS is not always the easiest task. This code aims to change that for when you just want location information. It automatically handles carrier and device hardware support differences and battery usage concerns.

More details in the KB article: “Simple Location API“.

Titlebar API: Many different applications have a need for consistent system displays in their application. Basics like network coverage, the time, or the name of an application are desirable standards for an application to display at the top of the screen. In the 6.0 SDK the Titlebar API was created for this, but there are still plenty of 5.0 devices out there, and some of us need to support some of the 4.x code lines as well. This library attempts to port that 6.0 Titlebar API back as far as the 4.2.1 SDK. A preprocessor based wrapper allows you to code with one Titlebar class and build with any version of the SDK from 4.2.1 through 7.1.

The full KB article including images is “How To Implement a TitleBar with Signal Strength, Battery Level, Icon, Unread mail and Clock

Analytics Sample: This sample implements each of the BlackBerry Analytics SDK methods so you have a handy reference. If you sign up for the service this sample is included in the SDK download, but with it open sourced we can continue to expand on it.

YouTube Client: Originally published to both our blog and YouTube’s blog, this sample shows you to work with the YouTube Data API using the very convenient BlackBerry Communication API from the 6.0 SDK. It’s a great starting point for either API or if you are doing a quick proof of concept with YouTube interaction. Further details in the KB: “How to – Create a YouTube viewer with the BlackBerry 6 Communication API

Check them out and see where the code takes you!

About these ads

About Tim Windsor

Application Development Consultant at BlackBerry. My focus is on WebWorks, HTML5 and Open Source.
This entry was posted in Java and tagged , . Bookmark the permalink.

One Response to Announcing Java Sample Repositories

  1. Pingback: News Summary – Dec 12th, 2011 | Open BB News

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s