net.rim.blackberry.api.homescreen
Interface ShortcutEventListener


public interface ShortcutEventListener

The interface that you must implement if you want to add a shortcut to the Home screen on the device.

HomeScreen ensures that all the methods of this interface are called on the event thread of the application that added the shortcut. For example, if application A added shortcut S on the Home screen, when the user launches shortcut S, launchShortcut() is called on the event thread of application A with the context of shortcut S.

See Also:
HomeScreen, ShortcutProvider
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  void editShortcut(String shortcutID)
          Called when a user edits a shortcut.
Category: Signed  void launchShortcut(String shortcutID)
          Called when a user clicks a shortcut on the Home screen.
Category: Signed  void shortcutDeleted(String shortcutID)
          Called when a user deletes a shortcut from the Home screen.
 



Method Detail

launchShortcut

void launchShortcut(String shortcutID)
Called when a user clicks a shortcut on the Home screen. If the application associated with the shortcut is running, it receives this call on its event thread. If the application is not running, then HomeScreen first launches the application (using the appDescriptor specified by the shortcut) and then calls this method on the application's event thread.

Parameters:
shortcutID - ID used when creating the Shortcut.
See Also:
Shortcut
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

editShortcut

void editShortcut(String shortcutID)
Called when a user edits a shortcut. If the application associated with the shortcut is running, it receives this call on its event thread. If the application is not running, then HomeScreen first launches the application (using the appDescriptor specified by the shortcut) and then calls this method on the application's event thread.

To control if your shortcut is editable, see setIsEditable()

Parameters:
shortcutID - ID used when creating the Shortcut.
See Also:
Shortcut
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

shortcutDeleted

void shortcutDeleted(String shortcutID)
Called when a user deletes a shortcut from the Home screen. If the application associated with the shortcut is running, it receives this call on its event thread. If the application is not running, then HomeScreen does not call this method and the Shortcut is removed from the Home screen.

Parameters:
shortcutID - ID used when creating the Shortcut.
See Also:
Shortcut
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-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal