# Presentation: 227602

**BlackBerry Developer Training**
- March 17, 2004

**Adam Rogers**** ****Application Development Consultant****Research In Motion **

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Persistence**
**Background Applications**
**Controlled APIs**

## BlackBerry Platform Overview

**Standards Based Connectivity**
**HTTP(s)/TCP**
**Wireless ‘Push’**

**Multiple Carrier/Network Support**
**JAVA****TM Based Wireless Handhelds**
**J2ME Compliant**
**BlackBerry Browser, SDK & APIs**

## BlackBerry Platform Overview

**Use the BlackBerry Browser to render and display data**
**Support for HTML, xHTML, WML and WML Script (support for JavaScript in 4.0)**
**Support for PUSH**
**Custom Java Applications**
**Written in Java using J2ME and BlackBerry APIs**
**Custom user interface**
**Able to store and process data**
**Able to make HTTP/TCP connections to the server**
**Supports background applications and PUSH**

## Developing For BlackBerry

**Developing For BlackBerry**

**import ****net.rim.device.api.ui.component.*;****import ****net.rim.device.api.ui.container.*;****import ****net.rim.device.api.ui.*;****class**** HelloWorld ****extends**** UiApplication{****    ****    ****public static void**** main(String[] args){****        HelloWorld myApp = ****new**** HelloWorld();****        myApp.enterEventDispatcher();****    }****    ****public**** HelloWorld(){****        MainScreen screen = ****new**** MainScreen();****        screen.add(****new**** RichTextField(****“Hello World!”****));****        pushScreen(screen);****    }****}**

## Developing For BlackBerry

**Developing For BlackBerry**

-     **public**** HelloWorld(){****        MainScreen screen = ****new**** MainScreen();****        screen.add(****new**** RichTextField(****“Hello World!”****));****        pushScreen(screen);****    }**

**Typically, the constructor for the main class will set up the initial screen of the user interface**
**Once the first screen is displayed the application can respond to user input from the trackwheel or the keyboard**
**Add a screen to the stack using “pushScreen(Screen s)”**

## Developing For BlackBerry

**Developing For BlackBerry**

**    ****public static void**** main(String[] args){****        HelloWorld myApp = ****new**** HelloWorld();****        myApp.enterEventDispatcher();****    }**

**The “main” method is called when the application is instructed to start.**
**The system passes in any arguments defined in the project properties**
**Typically, creates the main class and calls “enterEventDispatcher()” to start receiving and sending Ui events**
**Under normal circumstances “enterEventDispatcher() does not return.**

## Developing For BlackBerry

**Developing For BlackBerry**

**class**** HelloWorld ****extends**** UiApplication{**

**Any application that does any Ui work must extend either the UiApplication class or the Application class **

## Developing For BlackBerry

**Developing For BlackBerry**

**import ****net.rim.device.api.ui.component.*;****import ****net.rim.device.api.ui.container.*;****import ****net.rim.device.api.ui.*;****class**** HelloWorld ****extends**** UiApplication{****    ****    ****public static void**** main(String[] args){****        HelloWorld myApp = ****new**** HelloWorld();****        myApp.enterEventDispatcher();****    }****    ****public**** HelloWorld(){****        MainScreen screen = ****new**** MainScreen();****        screen.add(****new**** RichTextField(****“Hello World!”****));****        pushScreen(screen);****    }****}**

## Developing For BlackBerry

**BlackBerry uses a Java Swing-like extendable user interface API.**
**All BlackBerry Ui Classes are members of**
**net.rim.device.api.ui **
**net.rim.device.api.ui****.container**
**net.rim.device.api.ui****.component**
***Note* BlackBerry and MIDP Ui Classes are mutually exclusive, they can not be used in the same application.**

**Developing For BlackBerry**

**Developing For BlackBerry**

## Developing For BlackBerry

**All displayable elements, except Menu and MenuItem, extend field and implement methods such as paint to display data in a specific way.**
**Some field types include:**

**Developing For BlackBerry**

| RichTextField | Displays formatted text |
| --- | --- |
| EditField | Displays text which can be edited by the user |
| ListField | Displays a list of elements, each of which can be selected |
| Bitmap Field | Displays a bitmap |
| DateField | Displays the day, month and year. Each of which can be changed |

## Developing For BlackBerry

**Extends field, this means that a manager is displayable.**
**Managers ‘layout’ child fields in a specific way and instructs them to paint themselves. They also handle any scrolling of the fields**

**Developing For BlackBerry**

| VerticalFieldManager | Lays out child fields vertically |
| --- | --- |
| HorizontalFieldManager | Lays out child fields horizontally |
| FlowFieldManager  | Lays out child fields horizontally then vertically when it runs out of space on the current ‘line’ |
| DialogFieldManager  | Lays out an icon and a message left to right, then user fields vertically. |

## Developing For BlackBerry

**Extends Manager and hence can be displayed**
**Screens are ‘pushed’ or ‘popped’ onto and off of the Ui Stack. The screen on the top of the stack is currently visible.**
**Screens employ a delegate *****Manager *****to handle layout and scrolling.**
**Certain screens have a built in layout manager while others must have one specified at instantiation**

**Developing For BlackBerry**

## Developing For BlackBerry

**Screen types include**

**Developing For BlackBerry**

## Developing For BlackBerry

**How do I implement an Interface?**

**Developing For BlackBerry**

-     **public**** HelloWorld(){****        MainScreen screen = ****new**** MainScreen();****        screen.add(****new**** RichTextField(****“Hello World!”****));****        pushScreen(screen);****    }**

**MainScreen has a built in delegate manager which it uses to layout the fields.**
**When we add a field to the screen, it simply passes it to it’s delegate manager for layout. **

## Developing For BlackBerry

**A more complicated layout:**

**Developing For BlackBerry**

**public**** HelloWorld(){****    ****MainScreen screen = ****new**** MainScreen(); ****        screen.setTitle(****new**** LabelField(****"Hello World!"****));****        FlowFieldManager flowManager = ****new**** FlowFieldManager();**** ****       screen.add(flowManager);**** ****       ButtonField button1 = ****new**** ButtonField(****"Button 1"****);**** ****       ButtonField button2 = ****new**** ButtonField(****"Button 2"****);**** ****       ButtonField button3 = ****new**** ButtonField(****"Button 3"****);****        flowManager.add(button1); ****        flowManager.add(button2);****        flowManager.add(button3);****        screen.add(****new**** SeparatorField());****        screen.add(****new**** RichTextField(****"This is a Hello World****! ****"**** ****                                    +****"Application with some buttons"****));****        pushScreen(screen);****    }**

## Developing For BlackBerry

**A more complicated layout:**

**Developing For BlackBerry**

## Developing For BlackBerry

**Building custom Fields**
**Extend Field**
**Implement (at least) the *****layout***** and *****paint***** abstract methods.**
**The *****getPreferredWidth***** and *****getPreferredHeight *****methods should also be implemented for proper layout in some managers.**
**Building custom Managers**
**Extend Manager and implement (at least) *****sublayout, getpreferredHeight and getPreferredWidth.***
***sublayout *****should ****invoke each field's *****setPosition***** and *****layout***** methods **

**Developing For BlackBerry**

## Developing For BlackBerry

**Event Handlers**
**Listener-based approach**
**The Ui can listen for field and focus changes, scrolling, trackwheel and keyboard events**
**A listener must implement the appropriate listener interface.**
**Ex; *****FieldChangeListener***

**Developing For BlackBerry**

## Developing For BlackBerry

**Event Handlers**

**Developing For BlackBerry**

**ButtonField button1 = ****new**** ButtonField(****"Button 1"****);****MyListener listener =**** new**** MyListener();****button1.addChangeListener(listener);**
**class**** MyListener ****implements**** FieldChangeListener{****    ****public void**** fieldChanged(Field field, ****int**** context){****        ****ButtonField button = (ButtonField)field;****        ****final**** String label = button.getLabel();****        ****UiApplication.getUiApplication().invokeLater(****new**** Runnable(){****    ****        ****public void**** run()****{****                ****Status.show(label + ****" was pressed"****);****	****   ****}****        ****});**
**    ****}****}**

## Developing For BlackBerry

**Event Handlers**

**Developing For BlackBerry**

## Developing For BlackBerry

**Event Handlers**
***The TrackwheelListener***** and *****KeyListener****** *****interfaces***** *****are the most commonly implemented**
**Found in net.rim.device.api.system**
**Allow a field to respond to user input events.**
**Added to a Screen object**
**Are able to but do not necessarily consume the events**

**Developing For BlackBerry**

## Developing For BlackBerry

**Event Handlers**

**Developing For BlackBerry**

**class**** MyTrackwheelListener ****implements**** TrackwheelListener{****    ****public ****boolean trackwheelClick(****int**** status,**** int**** time){****        UiApplication.getUiApplication().invokeLater(****new**** Runnable(){****            ****public void**** run(){****                Status.show(****"The Trackwheel was clicked"****);****            }****        });****        ****return**** true;****    } ****    ****public**** boolean trackwheelRoll(****int**** amount, ****int**** status, ****int**** time){****       **** return**** false;****    } ****    ****public**** boolean trackwheelUnclick(****int**** status, ****int**** time){****        ****return**** false;****    }  ****}**

## Developing For BlackBerry

**Event Handlers**

**Developing For BlackBerry**

## Developing For BlackBerry

**Menus and MenuItems**
**Menu d****isplays a menu in the top right corner of the screen. A menu is a vertically arranged list of items. **
**A menu can display itself by calling it’s *****show***** method**
**MenuItems are runnable objects which are added to the menu.**
**The selected MenuItem is run by the system when the trackwheel is clicked.**

**Developing For BlackBerry**

## Developing For BlackBerry

**Menus and MenuItems**

**Developing For BlackBerry**

**public ****boolean trackwheelClick(****int**** status,**** int**** time){****    ****Menu menu = ****new**** Menu();****    ****MenuItem closeItem = ****new**** MenuItem(****"Close"****, ****1000****, ****1000****){****        ****public void**** run(){****            ****UiApplication.getUiApplication().invokeLater(****new**** Runnable(){****    ****            ****public void**** run(){****                    UiApplication.getUiApplication().popScreen(****                }****            });****        ****    System.exit(****0****);****        }****    };****    menu.add(closeItem);****    menu.show();****}**

## Developing For BlackBerry

**Menus and MenuItems**

**Developing For BlackBerry**

## Developing For BlackBerry

**Fields, Managers and Screens**
***Fields***** display data**
***Managers***** layout *****Fields***** and handle scrolling**
***Screens***** have a delegate *****Manager***** and are added to the Ui Stack and are made visible**
**Ui Event Handlers**
**Listeners for field and focus changes**
**Use *****TrackwheelListeners***** and *****KeyListeners***** to perform actions based on user input**
**Menus and Menu Items**
**Runnable *****MenuItems***** are added to *****Menus***
**The system runs the *****MenuItem***** when the user selects it from a Menu**

**Developing For BlackBerry**

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

## Developing For BlackBerry

**BlackBerry can use MDS to connect to the Intranet or the Internet. **
**HTTP(s) and TCP (socket) connections are supported**

**Developing For BlackBerry**

## Developing For BlackBerry

**The java.microedition.io classes are used to connect to the network**
**All connections should be executed on a separate thread to avoid blocking other applications.**

**Developing For BlackBerry**

## Developing For BlackBerry

**HTTP Connections**

**Developing For BlackBerry**

**Thread t = ****new**** Thread(****new**** Runnable(){****        ****public void**** run()****{****            ****try**** {****                ****// setup the connection****                HttpConnection http = (HttpConnection)Connector.open(URL);****                http.setRequestMethod(requestMethod);**

**create the connection on a new Thread**
**use Connector.open to establish the connection, cast this connection to an HTTPConnection**
**Set the request method and any request headers **

## Developing For BlackBerry

**HTTP Connections**

**Developing For BlackBerry**

**               ****DataOutputStream out = ****null****;****           ****    ****int**** length = data.length();****           ****    ****String slength = String.valueOf(length)****;****           ****    ****http.setRequestProperty(****"Content-Length"****, slength)****;****           ****    ****try**** {****               ****    ****out = http.openDataOutputStream();****  ****                 out.write(data.getBytes())****;****  ****    ****         }**** ****catch**** (IOException ioe) {****                   ****//Handle any exceptions which may be thrown****               ****}****           ****    ****out.close();  ****// close the output connection.**

**If there is any data to send to the server, write it to the output stream.**

## Developing For BlackBerry

**HTTP Connections**

**Developing For BlackBerry**

**                ****i****nt**** received;**** ****    ****           InputStream in = http.openInputStream();****     ****    ****       StringBuffer response = ****new**** StringBuffer();****         ****    ****   while((received = in.read()) != ****-1****){****             ****    ****   response.append((char) received);****            ****    ****}****            ****    ****in.close();  ****// close the input stream**

**Use an InputStream to get the response from the server. **
**Get the response headers if needed at this point**

## Developing For BlackBerry

**HTTP Connections**

**Developing For BlackBerry**

**                ****int**** httpStatus = http.getResponseCode();****                ****//close the connections****                http.close(); // close the HTTP connection****                ****//do something with the response data and code****            ****}****catch****(IOException ioe) {****                ****//handle any exception which may have been thrown****            }****        }****    });****t.start();**

**Finally, get the HTTP response code from the server and close the connection.**

## Developing For BlackBerry

**PUSH Connections**
**Push Listeners create an HTTP connection to a logical port on the BlackBerry (ex; http://:1111)**
**Server Application can then send data to that port**

**Developing For BlackBerry**

## Developing For BlackBerry

**PUSH Connections**

**Developing For BlackBerry**

**StreamConnection stream = ****null****;****for****(;;) {****    ****synchronized(****this****) {****     ****   ****//synchronize here so that we don't end up creating a connection that ****  ****        //****is never closed****        ****_****notify =**** (****StreamConnectionNotifier)Connector.open(****URL****);****   **** ****}****    ****//NOTE: the following comman****d**** will block until data is**** ****received****    stream = _notify.acceptAndOpen();**

**Typically done in a loop so a new connection will be opened when the last is closed.**

## Developing For BlackBerry

**PUSH Connections**

**Developing For BlackBerry**

**    ****input = stream.openInputStream();****    ****    ****int**** received;****   **** StringBuffer sb = ****new**** StringBuffer();****    ****while****((received = input.read()) != ****-1****){****    ****    ****sb.append((char) received);****    }**

**The acceptAndOpen method will block until it receives data, once it does we can read the data from the input stream.**

## Developing For BlackBerry

**PUSH Connections**

**Developing For BlackBerry**

**    ****stream.close();                   ****    input.close();****    _notify.close();****    _notify = ****null****;****    ****i****nput = ****null****;****    stream = ****null****;****    ****//****Do something with the data here****}**

**Close all streams and connections**
**This loop will then restart reopening the HTTP port to listen for the next push**

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

## Developing For BlackBerry

**Since BlackBerry is mutli-threaded it supports running processes in the background**
**These can be auto-run on startup or created by another application**
**Any process which could take more then a second to run should be executed on a separate thread**
**Background PUSH listeners are the most common type of background application.**

**Developing For BlackBerry**

## Developing For BlackBerry

**Creating a background PUSH Listener**
**Build an application which starts a Listener thread. Mark that application as “auto-run at startup” and “System Module”. **

**Developing For BlackBerry**

## Developing For BlackBerry

**Creating a background PUSH Listener**
**The system will run this applications main method when the handheld boots up. **
**The main method can start the listener thread**

**Developing For BlackBerry**

**public static void**** main(String[] args){****    ****//start the background listener****    ListenerThread**** t = ****new**** ListenerThread();****    t.start();****}**

## Developing For BlackBerry

**Creating Alternate Application Entry Points**
**Create a project with just an application icon**
**Make that project an ‘Alternate CLDC Application Entry Point’ for the main app.**

**Developing For BlackBerry**

## Developing For BlackBerry

**Creating Alternate Application Entry Points**
**The argument for the Alternate entry point gets passed into the applications main method when the user clicks on the application icon.**

**Developing For BlackBerry**

**public static void**** main(String[] args){****    i****f (args != ****null**** && args.length > ****0****  && args[****0****].equals(****"gui"****))****{****    ****    ****//start the UI****        BBTaskServerMain app = ****new**** BBTaskServerMain();****        app.enterEventDispatcher();****    }****}**

## Developing For BlackBerry

**Creating Alternate Application Entry Points**
**Put them together and the application can run the background listener on startup, and the Ui when the user selects the application Icon**

**Developing For BlackBerry**

**public static void**** main(String[] args){****    i****f (args != ****null**** && args.length > ****0****  && args[****0****].equals(****"gui"****))****{****    ****    ****//start the UI****        BBTaskServerMain app = ****new**** BBTaskServerMain();****        app.enterEventDispatcher();****    }****else{****        ****//start the background listener****    ****    ****ListenerThread**** t = ****new**** ListenerThread();****        t.start();    ****    }****}**

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

## Developing For BlackBerry

**Any application can save data in BlackBerry’s non-volatile flash memory. That data will persist across device resets**
**Any object which is marked ‘*****Persistable*****’ can be stored.**
**All API data types are Persistable**

**Developing For BlackBerry**

## Developing For BlackBerry

**Developing For BlackBerry**

**class**** MyDataObject ****implements**** Persistable{****    ****// implementation of myDataObject****}**

**To be persistable a data class only needs to implement the Persistable interface.**
**Persistable has no methods or variables **

## Developing For BlackBerry

**Developing For BlackBerry**

**PersistentObject ****persist = PersistentStore.getPersistentObject(fileName);****persist.****s****etContents(****myDataObject****);**

**To save an object it simply needs to be added to the persistent store using a unique filename. **

**PersistentObject ****persist = PersistentStore.getPersistentObject(fileName);****MyDataObject myDataObject = (MyDataObject)****persist.****get****Contents();**

**It can then be retrieved using that same filename**
**Persist.getContents() returns a reference to the Persistable object so any changes that are made to it at this point will be automatically saved when the application exits.**

## Developing For BlackBerry

**A more robust implementation**

**Developing For BlackBerry**

**MyDataObject myDataObject;****PersistentObject ****persist = PersistentStore.getPersistentObject(****fileName****);****Object storedObject = persist.getContents();****if****(storedObject == ****null**** || !(storedObject ****instanceof**** ****MyDataObject****)){****    persist.setContents(****new**** ****MyDataObject()****);****    persist.commit();****    ****myDataObject**** = (****MyDataObject****)persist.getContents();****} ****else ****{****    ****myDataObject**** = (****MyDataObject****)storedObject;****}**

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

## Developing For BlackBerry

**Any API which has the ability to access the system, the hardware, the crypto classes or any other applications data are signed.**
**The signed APIs are marked in the Java Docs**
**Any developer can use the signed APIs and run applications which use them under simulation**
**To run such an application on the handheld the application itself must be signed by the RIM signing servers.**

**Developing For BlackBerry**

## Developing For BlackBerry

**Once the application has been built the JDE can be used to request signatures for the application.**

**Developing For BlackBerry**

## Developing For BlackBerry

**The signature tool uses a hash of the application to generate proper signatures. BlackBerry checks for these signatures before it lets the application access a signed API.**

**Developing For BlackBerry**

## Agenda

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**
**Questions**
**Hands-On**
**Task Server Overview**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

## Questions?

**Developing For BlackBerry**
**Application Basics**
**User Interfaces**
**Screens, Fields and ****Managers**
**Ui Event Handlers**
**Menus and Menu Items**

**Connections**
**HTTP Connections**
**Push Listeners**
**Background Applications**
**Persistence**
**Controlled APIs**

_**Questions?**_

## Developing For BlackBerry

**BlackBerry Task Server Application**

**Developing For BlackBerry**

**BlackBerry Enterprise Server**

**Mobile Data Service**

**APP Server**

-  (HTTP Post)

- Send Data to Server

**Data**

**Push Server**

- Invoke a push to the handheld

**Admin Console**

**Push**

**Assign a new task to a user**

- *Note* : The Task Server Workspace can be found on the desktop of each training machine.

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Classes**

**Developing For BlackBerry**

| BBTaskServer_Task | BBTaskServer_TaskDetailsScreen |
| --- | --- |
| BBTaskServer_TaskList | BBTaskServer_TasksScreen |
| BBTaskServerMain | EventHandler |
| ListenerThread | MainScreenWithMenus |
| SplashScreen | TaskPushListener |
| HTTPTransport | HTTPTransportListener |

## Developing For BlackBerry

**BlackBerry Task Server Application**
**To Do**
**Make the data structure in BBTaskServer_TaskList****	****Persistable**
**Complete the BBTaskServer_TaskDetailsScreen ****	****class**
**Complete the HTTPTransport class**
**Complete the ListenerThread class**
**Modify the Main Method in BBTaskServerMain**

**Developing For BlackBerry**

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Make the data structure in BBTaskServer_TaskList****Persistable**

**Developing For BlackBerry**

**Make BBTaskServer_Task Persistable**
**Modify the Constructor in BBTaskServer_TaskList to either read in the data structure from the PersistantStore or create a new one if one doesn’t exist in the store.**

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Complete the BBTaskServer_TaskDetailsScreen class**

**Developing For BlackBerry**

**This class is a screen so you do not need to create a screen or a manager.**
**Add fields to the screen to display the task name, description, and status. This data is available from the BBTaskServer_Task object which is passed into the screen.**
**For more information on using Resource files see the *****BlackBerry Developer guide volume 1,  Chapter 7.***

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Complete the HTTPTransport class**

**Developing For BlackBerry**

**Setup the HTTP connection**
**Write the data to an output stream created from that connection.**
**Get the response from the server and pass it on to the *****transportResponse***** method.**
**Remember to close the connections!**

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Complete the ListenerThread class**

**Developing For BlackBerry**

**Implement the for loop which listens for incoming push connections**
**Use the *****acceptAndOpen***** method to block until a message arrives**
**Once you get a message, read the data and pass it to the *****updateData***** method**
**Remember to close the connections!**

## Developing For BlackBerry

**BlackBerry Task Server Application**
**Modify the Main Method in BBTaskServerMain**

**Developing For BlackBerry**

**Modify this method to start the Ui if the argument “gui” is passed in. Otherwise it should start the listener thread.**
**Make the main project “Autorun on startup” and “System module” so it will start the Background listener on startup**
**Set the secondary project to “Alternate CLDC application Entry” for the main project. Remember to pass in the appropriate argument for main().**

## Developing For BlackBerry

**BlackBerry Task Server Application**

**Developing For BlackBerry**

**Questions?**

**BlackBerry Developer Training**
- March 17, 2004

**Adam Rogers**** ****Application Development Consultant****Research In Motion **