Friday, July 1, 2011

EVENT_INTENT and CONFIG_INTENT

Two source attributes has been added to improve application interoperability:
EVENT_INTENT: The action of an Intent fired by Historify in case of the user selects an Event on the timeline. The action could be provided by a client when registering SharedSource or when posting via the QuickPost interface. Client applications could use this field to define a callback for handling the event click (e.g. displaying a detailed view of the event). To let the client know that which event has been clicked, a few attributes of the event (id, key, contact lookup key) are provided as Intent extras.
CONFIG_INTENT: The action of an Intent fired by Historify in case of the user selects the ‘More’ button of a Source on the source configuration Activity. Based on this field, the client application could define an Activity to let the user customize the behavior of the client (e.g. which type of data is shared) and integrate it seamlessly with the source settings of Historify.
There are already implemented examples demonstrate how to utilize these actions: The internal providers Messaging and Telephony define an EVENT_INTENT action which launches a dialog-styled Activity displaying the event data and a button to let the user get in touch with the contact (see Figure 1.). The LendMe showcase application defines the EVENT_ITENT as a callback to its ItemsActivity showing the Item associated with the Event.
Fig. 1: EVENT_INTENT handling by the internal sources.
The way how the CONFIG_INTENT works is observable by browsing the Sources (see Figure 2). If a source has a registered CONFIG_INTENT (currently QuickPosts and HelloSharedSource do that), an image button is shown, and by clicking on it the user could launch the Activity that handles that Intent. In case of the QuickPosts source, the config Activity currently displays a list of the applications that posted via the QuickPost interface (see Figure 3). HelloSharedSource’s config Activity is the main Activity of the application.
Fig. 2: Sources with a CONFIG_INTENT display a 'More' image button.
Fig. 3: CONFIG_INTENT of the QuickPosts provider launches an internal activity.

No comments:

Post a Comment