-
-
Notifications
You must be signed in to change notification settings - Fork 86
Barrier Free Information
The objective of this component is to provide barrier free information to the user, including:
- Facilities
- Contact Information
- Useful links
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.
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
BarrierfreeContact
BarrierfreeMoreInfo
BuildingsToGps
These are models for receiving data from the server. BarrierfreeContact
and BarrierfreeMoreInfo
are also used by the adapter.
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.