net.rim.blackberry.api.homescreen
Class ShortcutProvider

java.lang.Object
  extended by net.rim.blackberry.api.homescreen.ShortcutProvider

public abstract class ShortcutProvider
extends Object

Used to create shortcuts on the Home screen of the device. To create a shortcut, call the static ShortcutProvider.createShortcut(java.lang.String, java.lang.String, int) method.

See Also:
Shortcut, HomeScreen.addShortcut(), ShortcutEventListener
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

Method Summary
Category: Signed static Shortcut createShortcut(String description, String shortcutID)
          Creates a shortcut.
Category: Signed static Shortcut createShortcut(String description, String shortcutID, int index)
          Creates a shortcut for applications that have multiple entry points.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

createShortcut

public static Shortcut createShortcut(String description,
                                      String shortcutID,
                                      int index)
                               throws IllegalArgumentException
Creates a shortcut for applications that have multiple entry points. If the module has multiple entry points, use this method to create a shortcut for one particular entry point on the Home screen.

Parameters:
description - Specifies the description of the shortcut. The description displays when the shortcut is in focus.
shortcutID - String representing a unique ID used by the application to identify the shortcut. For example, the Contacts application might use the ID .. This shortcutID must be unique across a single application. Two different applications might have the same shortcutID.
index - The index that corresponds to the order in which alternate entry points were created in the original BlackBerry application project from 0. Applications can create one separate alternate entry point for all the shortcuts. This way applications can distinguish whether the application was launched directly or whether the shortcut was launched.
Returns:
The shortcut that can be registered with the Home screen.
Throws:
IllegalArgumentException - if the shortcutID is null, an empty String, or white space.
IllegalArgumentException - if the description is null, an empty String, or white space.
IllegalArgumentException - if a shortcut with the same ID for the same application already exists on the Home screen.
IllegalArgumentException - if there is no application descriptor available for the specified index.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0

createShortcut

public static Shortcut createShortcut(String description,
                                      String shortcutID)
                               throws IllegalArgumentException
Creates a shortcut. The shortcut uses the main application descriptor of the calling application.

Parameters:
description - Specifies the description of the shortcut. The description displays when the shortcut is in focus.
shortcutID - String representing a unique ID used by the application to identify the shortcut. For example, the Contacts application might use the ID .. The shortcutID must be unique across a single application. Two different applications might have the same shortcutID.
Returns:
The shortcut that can be registered with the Home screen.
Throws:
IllegalArgumentException - if the shortcutID is null, an empty String, or white space.
IllegalArgumentException - if the description is null, an empty String, or white space.
IllegalArgumentException - if a shortcut with the same ID for the same application already exists on the Home screen.
Category:
Signed: This element is only accessible by signed applications. If you intend to use this element, please visit http://www.blackberry.com/go/codesigning to obtain a set of code signing keys. Code signing is only required for applications running on BlackBerry smartphones; development on BlackBerry Smartphone Simulators can occur without code signing.
Since:
BlackBerry API 6.0.0





Copyright 1999-2010 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Copyright 1993-2003 Sun Microsystems, Inc. 901 San Antonio Road, Palo Alto, California, 94303, U.S.A. All Rights Reserved.
Copyright 2002-2003 Nokia Corporation All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.