The base Activity has the cleaver name of BaseLensesActivity. It does not do anything out of the ordinary for a ListActivity, but it has 4 Class variables that are the key to the subclasses being able to extend BaseLensesActivity. The 4 fields are currentContext, title, storedKey and atomFeedURL. These 4 fields are overridden by the subclasses so the correct data is stored and displayed.
Details of the 4 fields:
- currentContext - used when the Context is passed to the MenuHandler object. It is set to the current subclass.
- title - the title displayed on the activity. It is set to the Lens type.
- storedKey - used when storing the list of lenses in the ContextCache object. Lists are stored when the Activity is paused so it does not have to be reloaded from the Connexions site.
- atomFeedURL - the URL for the Feed for the Lens type.
You can browse the source or download a zip file of the source. Connexions for Android is available in the Android Market or from the Connexions website.