Skip to content

3. Service

Mihail Varbanov edited this page Apr 19, 2022 · 4 revisions

The application creates and starts a set of services that are used to provide data to the UI. Some of these services reside entirely in the Rokwire Plugin. Other services are defined in the Rokwire Plugin but overridden on the application level in order to customize their behavior or to provide application specific data or functionality. Third part of services reside entirely in the application.

Analytics

Analytics service is defined in the Rokwire Plugin and overridden in the application. The application class provides APIs to log specific events for the Illinois application like app page transitions, alerts, user clicks, lifecycle events, HTTP traffic, current geofence region updates and many more. Each analytics log contains event specific properties (e.g. the UI element name that was clicked), as well as a set of shared properties that are applied to all events like OS version, device model, current locale, connection status, location & notification services status and so on.

AppDateTime

AppDateTime service is overridden in the application in order to provide application dependent resources like the timezones database or specific settings for the application like the local university timezone.

Auth2

The application extends the Auth2 plugin service in order to add iCard (Auth2Card) support for OIDC login type.

Canvas

Provides access to LMS BB APIs (respectively Canvas LMS APIs) which represents user’s activity related to canvas courses, assignments, events etc.

Config

The application extends the Config plugin service in order to add access endpoints to services that are not part of Rokwire Plugin like canvas courses, dining locations, etc.

DeepLink

The application extends the DeepLink plugin service in order to provide the application's deep link scheme and host.

DeviceCalendar

The application extends the DeviceCalendar plugin service in order to add/remove calendar event when a user favorite is set/unset.

Dinings

Provides access to the dining endpoints and related data like: locations, menu schedule, food types, ingredients, nutrition information, food filtering and various helper methods for the UI representation.

FirebaseMessaging

The application extends FirebaseMessaging plugin service in order to maintain Firebase topic subscriptions depending on user activity as well as processing the FCM notifications that arive.

FlexUI

The application extends FlexUI plugin service in order to extend the supported rules with IlliniCash and iCard conditions.

GIES

Gies service maintains content for iDegrees new Student Checklist. It is a hierarchical structure of tasks that a new student has to accomplish. The service loads this content from application assets and keeps track which items have been proceeded and what has left to be done.

Guide

Guide service maintains the content for Campus Guide. It is a large set of articles structured by categories. It is loaded from application assets but also allows overriding their content from the cloud. A special subset of campus guide is campus reminders that feeds the content of Campus Reminders widget in the Home panel. Another special subset is the promoted list that feeds Campus Highlights widget from the Home panel. The promoted list content is dynamic and depends on current datetime, user roles and iCard content.

IlliniCash

IlliniCash service provides access to the IlliniCash balance and history data. This data is available only for University Students and Staff users that are OIDC authenticated. The information that could be accessed is: IlliniCash balances, IlliniCash transaction history, Cafe Credit transaction history and Meal Plan transaction history.

Laundry

Laundry service provides access to laundry view service endpoints for loading laundry rooms, appliances and availability. It also maps every laundry location from assets/assets.json to specific laundry rooms. As general LaundryService is responsible for every operation related to laundries.

LiveStats

LiveStats service provides access to the currently live games. It exposes APIs for retrieving live game by id, has live game by id. Fires a message when a specific live game has been changed. The user interface uses its APIs and also listens for the live game changed message.

NativeCommunicator

NativeCommunicator service provides a bridge to natively handled services in Android and iOS. These are services that are not available in Flutter or external libraries and need to be resolved natively on different platforms. They are mainly external SDKs that have no Flutter support like GoogleMaps / MapsIndoors SDKs that provide maps support to Rokwire app. There are also OS specific services that need native handling like closing Safari VC after Shibboleth login. NativeCommunicator also handles events that come from native sides and broadcasts them in the standard notification scheme.

Onboarding

The application extends Onboarding plugin service in order to match the particular onboarding panels for panel codes from assets/flexUI.json definition. This service is now obsolete, it is not used any more and it is partially replaced by Onboarding2 service.

Onboarding2

Onboarding2 service was initially designed to replace the Onboarding service but it was left in an intermediate and unfinished state. It currently handles building privacy levels based on user option selection from Onboarding privacy selection panels, and finishing the onboarding flow.

Polls

The application extends Polls plugin service in order to provide application specific UI (strings) and to handle opening a poll from FCM notification.

A poll can be activated in the following ways:

  • Manually, by poll owner;
  • On FCM notification for stadium poll;
  • On manual poll lookup by PIN code.

Once a poll is opened the voting UI has to be presented to the user. Then, while a poll is opened, it must be kept in active polls in order to monitor poll results. Finally, when a poll gets closed it is excluded from active polls. If the poll has hideResultsUntilClosed flag on, on close poll results UI has to be presented to the user.

RecentItems

RecentItems service is responsible for maintaining the recently accessed resources. It monitors and notifies the subscribed observers when a new RecentItem entry is created.

Rewards

Provides access to Rewards BB APIs for loading user’s history and balance.

Sports

Sports service handles all operations related to athletics and sports. It provides interfaces for:

  • loading sports from Sports BB and differentiating men and women sports;
  • loading schedules, athletics games, sport seasons, sport social medias, rosters and coaches from Sports BB;
  • sorting sports, games;
  • saving favorite sports;
  • notifying when sports or social medias are updated;
  • helper methods.

Storage

The application extends Storage plugin service in order to provide access to application specific preference data that is not available at the plugin's level.

Transportation

Transportation service exposes functionality for all activities related to transportation - retrieving parking events, parking lots for specific event, bus color and bus pass.

Twitter

Twitter service provides an API for loading user tweets that get displayed in a HomeTwitterWidget widget. The twitter user whose feeds get loaded is defined in app config and it varies depending on user type (GIES or Canvas group members). Twitter service uses the Content backend service in order to bypass limitations for number of requests for Twitter APIs.

Voter

Voter service dispatches the current voter daily rule that is used in HomeVoterRegistrationWidget widget. It is retrieved from the voter rules that are defined in assets/assets.json.