Skip to content
This repository has been archived by the owner on Jan 10, 2024. It is now read-only.

Barrier Free Information

Kordian Bruck edited this page Aug 9, 2017 · 1 revision

The objective of this component is to provide barrier free information to the user, including:

  • Facilities
  • Contact Information
  • Useful links

Structure

Activity

  • BarrierFreeInfoActivity
  • BarrierFreeContactActivity
  • BarrierFreeFacilitiesActivity
  • BarrierFreeMoreInfoActivity

BarrierFreeInfoActivity provides the master screen for this component, working as the enter point for the other three activities which are responsible to display the specific information in the list view.

Adapter

  • BarrierfreeContactAdapter
  • BarrierfreeMoreInfoAdapter

BarrierfreeContactAdapter and BarrierfreeMoreInfoAdapter are the adapters for the corresponding activities. For facilities, RoomFinderListAdapter is used. Both of the three adapters are subclass of SimpleStickyListHeadersAdapter

Model

  • BarrierfreeContact
  • BarrierfreeMoreInfo
  • BuildingsToGps

These are models for receiving data from the server. BarrierfreeContact and BarrierfreeMoreInfo are also used by the adapter.

Workflow & API

Class API onClick
BarrierFreeContactActivity /Api/barrierfree/contacts PersonsDetailsActivity
BarrierFreeFacilitiesActivity /Api/barrierfree/nerby/building_nr/ RoomFinderDetailsActivity
/Api/barrierfree/listOfElevators/
/Api/barrierfree/listOfToilets
BarrierFreeMoreInfoActivity /Api/barrierfree/moreInformation Web page
LocationManager /Api/barrierfree/getBuilding2Gps/ N/A

TUMCabeClient and Retrofit are used to handle request for the data.

If the contact information received from the server contains TUMOnline ID, BarrierfreeContactAdapter will generate a "More Information" button and clicking it makes the app jump to PersonsDetailsActivity.

BarrierFreeFacilitiesActivity provides a spinner and what to fetch is decided by the item selected in the spinner. When "Nearby" is selected, it firstly asks LocationManager to provide the current building id. LocationManager may return the value from local database caching or fetching it from the server. Then BarrierFreeFacilitiesActivity has the correct API URL of the data.