Presentation is loading. Please wait.

Presentation is loading. Please wait.

PROG 38448 Mobile Java Application Development PROG 38448 Mobile Java Application Development BlackBerry API for UI Applications.

Similar presentations


Presentation on theme: "PROG 38448 Mobile Java Application Development PROG 38448 Mobile Java Application Development BlackBerry API for UI Applications."— Presentation transcript:

1 PROG 38448 Mobile Java Application Development PROG 38448 Mobile Java Application Development BlackBerry API for UI Applications

2 10/9/2015Wendi Jollymore, ACES2 BlackBerry API for UI What is the purpose of a GUI in an application? Relationship between app and user Provide information in a user-friendly way Easy to read Intuitive Familiar

3 10/9/2015Wendi Jollymore, ACES3 BlackBerry API for UI Which UI API to use? BlackBerry Java App: BlackBerry Java UI API Always extends UiApplication and starts with main() And probably MIDP API and CLDC API MIDlet An app that uses the MIDP UI API Can run on any device that uses Java ME

4 10/9/2015Wendi Jollymore, ACES4 BlackBerry UI API Advantages Provide more functionality for BB devices than just MIDP API Can run background threads after app closes Can start automatically in the background when device turns on Can use IPC (Inter-Process Communications) APIs to send and rec’v information Can access trackball and trackwheel events Can access touch screen events Can access and use accelerometer data Can integrate with other BB apps Can change home screen icon for your app

5 10/9/2015Wendi Jollymore, ACES5 BlackBerry UI API Disadvantages BlackBerry APIs can only be used on a BlackBerry device.

6 10/9/2015Wendi Jollymore, ACES6 UI Guidelines Consider limitations of mobile devices: Small screen size, limited # of characters Slower processor Wireless network – slower, longer delays Small amount of memory Short battery life Can only display one screen at a time Users expect smaller amounts of information quickly BlackBerry UI was designed with this in mind

7 10/9/2015Wendi Jollymore, ACES7 UI Guidelines Be consistent Use or extend existing components Allows you to inherit default behaviour Follow standard navigation model Actions are the same for all apps Support and extend user tasks Help user perform tasks easily e.g. auto- detect location if your app is location- based BlackBerry users are familiar with how BlackBerry UIs work!

8 10/9/2015Wendi Jollymore, ACES8 UI Guidelines Focus on user’s task Only display data/components that are relevant to the task at hand Make selection of data simple Make menu items relevant and in context E.g. for an app that searches for hotels, a “search” or “start over” item would be relevant, but a “delete” item might not be

9 10/9/2015Wendi Jollymore, ACES9 UI Guidelines Minimize clicks needed to complete a task Allow for “Undo” It’s easier on a small screen to click the wrong thing by accident Design your display for the small screen

10 10/9/2015Wendi Jollymore, ACES10 UI Input and Action Triggers Devices contain standard input methods: Keyboard Trackball or track pad Track wheel Escape key Touch screen Standard behavior: Clicking trackball, track wheel, track pad or touch screen invokes a menu item or application icon Escape cancels current operation or returns to previous screen See more in Section 2 of the UI & Navigation Development Guide

11 10/9/2015Wendi Jollymore, ACES11 UI Components Three main components that make up a UI: Screen Display, layout Menu Standard behavior when user clicks or Escapes Managers Arranges components in a specific way Like Java SE layout mangers Fields Standard UI elements like buttons, labels, text fields, radio buttons, check boxes, etc.

12 10/9/2015Wendi Jollymore, ACES12 UI Components Screens contain Managers, Managers contain Fields Component Screen Object Manager Object

13 10/9/2015Wendi Jollymore, ACES13 Screen Class net.rim.device.api.ui.Screen Starting point for the GUI Only one screen can be displayed at a time Screen display stack Screens are displayed by pushing and popping them on/off the display stack Only the screen on top of the stack is seen A screen can exist only once in the stack net.rim.device.api.ui.container Common subclasses of Screen class Check this out in the api docs

14 10/9/2015Wendi Jollymore, ACES14 MainScreen Class A child of Screen (via FullScreen) Contains standard UI components: Default screen title Scrollable VerticalFieldManager Default menu with Close item Default action for Close menu item and escape key Most BlackBerry apps’ screens are extended from MainScreen

15 10/9/2015Wendi Jollymore, ACES15 Manager Class net.rim.device.api.ui.Manager Manages the layout of the components of your UI And how the components react when laid out near each other Just like layout mangers in Java SE Every screen object contains at least one manager net.rim.device.api.ui.container Some common sub classes of Manager

16 10/9/2015Wendi Jollymore, ACES16 Manager Examples VerticalFieldManager Lays out fields in a single column Can be constructed with horizontal or vertical scroll Manager.HORIZONTAL_SCROLL or Manager.VERTICAL_SCROLL FlowFieldManager Like the Java SE FlowLayout Lays out components horizontally and vertically like words on a page Wraps to next line

17 10/9/2015Wendi Jollymore, ACES17 Field Class net.rim.device.api.ui.Field A rectangular region that displays output to a user Can also accept input net.rim.device.api.ui.component Contains pre-made component classes Look this up in the api docs

18 10/9/2015Wendi Jollymore, ACES18 Field Examples LabelField A simple label with text Text Field A simple text field for inputting text EditField Simple text field that has its own label RichTextField Label field with formatting ListField, ChoiceField, RadioButtonField, CheckBoxField DateField, ButtonField

19 10/9/2015Wendi Jollymore, ACES19 Exercise See the Exercise section in the notes


Download ppt "PROG 38448 Mobile Java Application Development PROG 38448 Mobile Java Application Development BlackBerry API for UI Applications."

Similar presentations


Ads by Google