CNIC Information System with Pakdata Cf In Pakistan
Super Apps Webcast February 2010
1. Super Apps for BlackBerry
Mike Kirkup, Developer Relations Director
February 25, 20101
2. Super App Experience
Experiences that transform user
behavior
Apps that people use every day
3. Super App Experience
• Always-on experience
• Seamless integration with native
apps and 3rd party apps
• Proactive, notification-driven
• Contextualized
• Social and connected
• Efficient and intelligent
4. Super App Enablers
• Multi-threaded O/S with background apps
• APIs for deep, contextualized integration
with Inbox, PIM, Camera, Phone, etc.
• Rich event-based notification model
• Push services for just-in-time data delivery
• Integrated LBS and Mapping
Platform to enable highly engaging, real-time
apps that act as natural extensions to the
apps they already use
5. Super App Examples
• Menu item in the Inbox launches app with
relevant context
• App updates the Calendar or Contacts
• App notifies the user when their favorite
team is playing
• App detects significant location change
and proactively engages the user
• App quietly downloads media content in
the background
6. Technical Drivers for Super Apps
• Deep native integration
• Seamless flow
BlackBerry® Bold™ 9700 smartphone
• Application synergy
• Always on, always connected
• Real-time multi-tasking
• The power of push
• The cloud in your pocket
• Leveraging context
• Integrated with remote data and services
7. Deep Native Integration
• Intuitive extensions to the BlackBerry® experience
• Built for integration from the ground up
• Lower the learning curve for application use
• Cohesive and seamless user experience
• Consistent behavior
• Increased application stickiness
• Remove think-points
• Add discovery points for your applications and services
8. It Just Works!
Examples
• While viewing a Contact, launch turn-by-
turn navigation application to provide
BlackBerry® Bold™ 9700 smartphone
directions to the associated address
• Display customer sales information on the
incoming call screen when a customer
calls
• When a notification arrives during an
important meeting, the silent setting is
respected and the meeting is not
interrupted
• Within the media player, launch a service
to discover music
10. Invoking Native Applications
• Launch native BlackBerry
applications using the Invoke API
• Address Book, Message, Calendar,
BlackBerry® Bold™ 9700 smartphone
BlackBerry® Maps, Camera, Video
Recorder, Phone, Search, etc.
• Pass context to application using
ApplicationArguments
11. Invoking Native Applications
• Java Example
String appType = Invoke.APP_TYPE_ADDRESSBOOK;
ApplicationArguments appArgs = new
AddressBookArguments(AddressBookArguments.ARG_VIEW, contact);
Invoke.invokeApplication(appType, appArgs);
• JavaScript Example
<script type="text/javascript">
var contact = new blackberry.pim.Contact();
contact.firstName = „Chris';
contact.lastName = „Smith';
var args = new blackberry.invoke.AddressBookArguments(contact);
args.view = blackberry.invoke.AddressBookArguments.VIEW_NEW;
blackberry.invoke.invoke(blackberry.invoke.APP_ADDRESSBOOK, args);
</script>
12. Handling Content
• Invoke native Content Handlers
• Launch applications to handle specific content
• Optional response back from the handler
• Register Content Handlers to launch an application
• Create handlers for unsupported mime-types
• Java Example
Registry registry =
Registry.getRegistry(MyApplication.class.getName());
Invocation invocation = new Invocation(null, null,
BlackBerryContentHandler.ID_MEDIA_CONTENT_HANDLER,
false, ContentHandler.ACTION_OPEN);
invocation.setArgs(new String[] {
BlackBerryContentHandler.MEDIA_ARGUMENT_VIEW_PICTURES });
registry.invoke(invocation);
13. Recognizing Text Patterns
• Register menu items for specific
text patterns
• Patterns hyperlink when they appear in
any active UI component
• Exact match, or regular expressions
• Java Example
String pattern = “@[*]";
Int patternType =
PatternRepository.PATTERN_TYPE_REGULAR_EXPRESSION
;
PatternRepository.addPattern(ad_menuhandler,
pattern, patternType,
new ApplicationMenuItem[] { ami });
14. Creating Custom Menu Items
Add menu items to native applications
• Select placement of menu items
BlackBerry® Bold™ 9700 smartphone
• Pass context on invocation
• Register menu items for text patterns
15. Creating Custom Menu Items
Java Example:
ApplicationMenuItemRepository amir =
ApplicationMenuItemRepository.getInstance();
int placement = 0x350100; // Menu placement
ApplicationMenuItem ami =
new ApplicationMenuItem(placement) {
public Object run(Object context) {
// … do something …
return null;
}
public String toString() {return “Translate with Navita”;}
};
amir.addMenuItem(
ApplicationMenuItemRepository.MENUITEM_SYSTEM, ami, ad_menuhandler);
17. Application Icons
• Customize icons and their placement
• Un-focused and focused (rollover) icons
• Set static images
• Dynamically change icons
• A single application can have multiple
entry points, with corresponding icons
• Placement within specified folders
• JavaScript Example
<script type="text/javascript">
blackberry.app.setHomeScreenName("New data");
blackberry.app.setHomeScreenIcon("local:///myimage.png", null);
// Set hover icon
blackberry.app.setHomeScreenIcon("local:///myHoverimage.png", true);<
/script>
18. Application Messages and Banner Indicators
• Add custom items to the Messages
application
• Separate folders or combined in message list
BlackBerry® Bold™ 9700 smartphone
• Preview text and picture
• Custom icons
• Menu items
19. Application Messages and Banner Indicators
Java Example
// Register icon for indicator
ApplicationIndicatorRegistry air = ApplicationIndicatorRegistry.getInstance();
air.register(icon, false, false);
// Add an Application Message
ApplicationMessage myMessage = new MyApplicationMessage();
collection.addMessage(myMessage);
folder.fireElementAdded(myMessage);
ApplicationIndicator ai = air.getApplicationIndicator();
int size = collection.size();
ai.setValue(size);
ai.setVisible(size > 0);
20. Phone Screen Customization
• Add text and images to Phone screens
• Java Example
if (PhoneScreen.isSupported()) {
Phone.addPhoneListener(
new AbstractPhoneListener() {
public void callIncoming(int callId) {
PhoneScreen ps =
new PhoneScreen(callId,
Application.getApplication());
ps.add(new BitmapField(
Bitmap.getBitmapResource(“img/bbdc.jpg”)));
ps.sendDataToScreen();
}
});
}
21. Notifications Manager
• Register your own notification source
• Appears within the profiles in Sounds
• Java Example
// Register Notification Source
NotificationsManager.registerSource(
sourceID,
“Notifications Demo”,
NotificationsConstants.IMPORTANT );
// Trigger Notification
NotificationsManager.triggerImmediateEvent(
sourceID, … );
22. Embedding Native Application
Components in Your Application
• Auto-Complete Field
• Location Picker
BlackBerry® Bold™ 9700 smartphone
• File Picker
• Map Field
• Browser Field
• Multi-Media Players
23. Auto-Complete Field
• Use Provided Data Sources, or customize
• Contacts, Memos, Music, Pictures, Ringtones, Tasks,
Videos, Voice Notes
• Java Example
BasicFilteredList bfl = new BasicFilteredList();
bfl.addDataSource(0,
BasicFilteredList.DATA_SOURCE_CONTACTS,
BasicFilteredList.DATA_FIELD_CONTACTS_NAME_FULL |
BasicFilteredList.DATA_FIELD_CONTACTS_COMPANY,
BasicFilteredList.DATA_FIELD_CONTACTS_NAME_FULL |
BasicFilteredList.DATA_FIELD_CONTACTS_COMPANY |
BasicFilteredList.DATA_FIELD_CONTACTS_EMAIL,
-1, -1, null,
BasicFilteredList.COMPARISON_IGNORE_CASE);
AutoCompleteField autoCompleteFieldContacts = new AutoCompleteField( bfl,
AutoCompleteField.LIST_DROPDOWN |
AutoCompleteField.LIST_EXPAND_ON_CLICK);
24. Location Picker
• Embed a location chooser component in your UI
• Add multiple location sources
• Contacts, Manual entry, GPS, Find on a Map,
Recent Locations, Application suggestions
• Java Example
LocationPicker.Picker[] locationPickersArray =
new LocationPicker.Picker[] {
EnterLocationPicker.getInstance(false),
SuggestedLocationPicker.getInstance(
"App specific...", landmarks ),
RecentLocationPicker.getInstance(),
GPSLocationPicker.getInstance(),
MapsLocationPicker.getInstance(),
ContactsLocationPicker.getInstance(false)
};
LocationPicker locationPicker =
LocationPicker.getInstance(locationPickersArray);
locationPicker.setListener(this);
locationPicker.show();
25. File Picker
• Embed a file chooser component in your UI
• Filter files shown
• Choose directory to start in
Java Example
// Get the FilePicker instance
FilePicker filePicker = FilePicker.getInstance();
// Set the file picker to only display mp3 files
filePicker.setFilter(".mp3");
// Obtain the default system music directory
String path =ystem.getProperty("fileconn.dir.memorycard.music");
// Set the directory to open the file picker in
filePicker.setPath(path);
filePicker.setListener(this);
filePicker.show();
26. Map Field
• Embed BlackBerry Maps within UI
• Control over map shown
BlackBerry® Bold™ 9700 smartphone
•position, zoom, and rotation
• Paint over top of Map
• Java Example
MapField mapField = new MapField();
mapField.moveTo(initialLocation);
mapField.setZoom(initialZoom);
screen.add(mapField);
27. Browser Field
• Embed the Browser in UI
• Render HTML and Javascript within a Field
• Supports new Browser rendering engine
•Java Example
// create new instance of the BrowserField
BrowserField browserField = new BrowserField();
// set a border for the BrowserField
XYEdges thickBorder = new XYEdges(5, 5, 5, 5);
int hp = Color.HOTPINK;
XYEdges borderColor = new XYEdges(hp, hp, hp, hp);
Border border = BorderFactory.createSimpleBorder(thickBorder,
borderColor, Border.STYLE_SOLID);
browserField.setBorder(border);
// add the browser field to the screen
screen.add( browserField );
// request the content you wish to display
browserField.requestContent( "http://www.helloworld.org" );
28. Multi-Media Players
• Embed Media player/recorders in a component in
your UI
• Audio/video player, camera/video recorder
•Java Example
Player player = Manager.createPlayer("capture://video");
player.realize();
videoControl = (VideoControl)player.getControl( "VideoControl" );
videoField = (Field) videoControl.initDisplayMode(
VideoControl.USE_GUI_PRIMITIVE,
"net.rim.device.api.ui.Field");
videoControl.setDisplayFullScreen(true);
videoControl.setVisible(true);
player.start();
29. Always On, Real-time Multi-tasking
• Applications run in the background
• Most start on device power-up.
• Listening for events
BlackBerry® Bold™ 9700 smartphone
• Querying a server in the cloud
• Listening for inbound “push data”.
30. Always On, Real-time Multi-tasking
Java Example
public static void main(String[] args) {
if (args != null && args.length > 0) {
if (args[0].equals("startup")) { // startup code registering menu items
ApplicationDescriptor ad_startup =
ApplicationDescriptor.currentApplicationDescriptor();
ApplicationDescriptor ad_menuhandler = new ApplicationDescriptor(
ad_startup , "Demo menu handler", new String[]{"menu"});
amir.addMenuItem(ApplicationMenuItemRepository.MENUITEM_SYSTEM,
ami, ad_menuhandler);
} else { // args[0].equals("menu")) {
// respond to launch from menu
}
} else {
// respond to launch from home screen
}
31. Always Connected
• User interaction driven by change events
• Alert the user when something relevant happens
• Display contextual data to the user (e.g. information about the
person phoning you)
• Update data on the handheld without alerting the user to ensure
they‟ve got the most up-to-date content
• Example
// create new instance of the BrowserField
BrowserField browserField = new BrowserField();
// set a border for the BrowserField
XYEdges thickBorder = new XYEdges(5, 5, 5, 5);
int hp = Color.HOTPINK;
XYEdges borderColor = new XYEdges(hp, hp, hp, hp);
32. The Power of Push
• Mobile users consume data and
information differently
• Reach your audience anytime,
BlackBerry® Storm™ smartphone
anywhere with timely,contextual data
• Add a notification to the top of the home
screen
• Update the applications home screen icon
with an “alert indicator”
• Push a notification dialog box on top of the
current screen
• Play a tone or vibrating the device
33. The Power of Push
• JavaScript Example
<script>
function startListening() {
var port =1234;
blackberry.push.openPushListener(handleMyReturnData, port, null);
}
function handleMyReturnData(data)
{
if (data != null) {
var myRecievedData= blackberry.utils.blobToString(data.payload)
alert(myRecievedData);
Else
alert("No data from the push");
}
</script>
34. The Cloud in Your Pocket
• Optimized interaction mode for mobile use case
• Rich online services and APIs deliver transformative
experiences
• Advertising Service APIs
• Payment Service APIs
• Cell Site Geo-location APIs
• Leveraging Context
35. Change the Game With Context
• Build-in location awareness
• Presence / availability awareness
BlackBerry® Storm™ smartphone
• Aware of previous data selected in
another application
• Time of day awareness
• Aware of events occurring on the
device
36. Transformative Experiences
Aligned Partnerships
RICH INTEGRATION DEVELOPERS
CONTEXTUALIZATION CONTENT PROVIDERS
PERSONALIZATION AWARE TOOLING VENDORS HOSTERS
TRANSFORMATION ALIGNMENT
LIFE
EXPERIENCEEXPERIENCE CARRIERS
PROACTIVE INTEGRATORS CUSTOMERS
PROACTIVE ENGAGEMENT
CONSUMER
ENTERPRISE PERSONAL ENTERPRISE PLATFORMS
BUSINESS
ENGAGEMENT
Not about the Smartphone, it’s about the future of personal
37. Thank You
Mike Kirkup
Director, Developer Relations