RaceCommittee App

Introduction

The RaceCommittee App is an Android 3.2 Tablet application. This document serves as the main information hub about the App and how to develop for it.

User Guide

Have a look at the following user guides to get an idea how to work with the RaceCommittee App.

Features

A Feature List collected in September 2013 at the Testevent in Santander can be seen here: Feature List RaceCommittee App (RaceCommittee Feature List, Sep. 2013, Julian Gimbel) The Feedback a User gave to the Application and the Feedback the user gave to the Applikation and Hardware of SwissTiming can be seen here: Feature List RaceCommittee App (Swiss Timing App and Feedback for SAP RaceCommittee App, Sep. 2013, Julian Gimbel)

Course Updates

Kuruh, Kuruh,…

RaceState

intro-text zu racestate, was ist das, wo kann ich es nutzen

Adding a new user interface

text zu den listener

Implementing a RacingProcedurePrerequisite.Resolver

When writing a new user interface for the RaceState your UI code has to be capable of fulfilling possible RacingProcedurePrerequisites. Such a Prerequisite may occur when you're requesting a new start time on the RaceState. The call to RaceState#requestNewStartTime takes a RacingProcedurePrerequisite.Resolver, which will be in charge of fulfilling prerequisites.

The RacingProcedurePrerequisite.Resolver is an asynchronous interface passing you specific prerequisites demanding to be fulfilled. In your implementation of the interface show an appropiate dialog-window or something similar and be sure to call the specific fulfilled method on the passed prerequisite when done. This will trigger the RaceState to check for further prerequisites. When you've fulfilled everything your resolver's onFulfilled method will be called. Afterwards the requested start time will be set.

How does the resolving work

On call to RaceState#requestNewStartTime the RaceState creates an anonymous function (called FulfillmentFunction) to be exected when all prerequistes are fulfilled. This function simply sets the start time on the RaceState as requested.

Next the RaceState asks its RacingProcedure for any prerequisites. It does so by calling RacingProcedure#checkPrerequisitesForStart passing the requested start time and the FulfillmentFunction. The returned RacingProcedurePrerequisite will be resolved by your resolver.

To resolve a prerequisites against a resolver, RacingProcedurePrerequisite#resolve is called passing the resolver. This method implements a simple double dispatch visitor pattern. Specific implementations will call their specific fulfilment method on the resolver (see above). After the resolver has done its work for this prerequisite it will call the specific fulfilled method. This will trigger the base BaseRacingProcedurePrerequisite#fulfilled method, which checks for the next prerequisite on the RacingProcedure (passing down the start time and the fulfillment function) and resolves it against the same resolver object.

This chain continues until the RacingProcedure detects that there are no further prerequisites. It will return a special type of RacingProcedurePrerequisite, the NoMorePrerequisite. On resolve a NoMorePrerequisite executes the fulfillment function and won't call BaseRacingProcedurePrerequisite#fulfilled - effectively breaking the chain of resolving. The start time is set and your resolver RacingProcedurePrerequisite.Resolver#onFulfilled is called.

Adding a new racing procedure

configuration!

Configuration

intro-text verweis zu admin-guide

Adding a new configuration option

DeviceConfiguration vs RegattaConfiguration merge PreferenceScreen and AppPreferences

RaceLog priorities and authors

Bruuuum.

Versioning

Baruh

Build and Auto-Update

On Maven builds the resulting APK of the RaceCommittee App will be made available as static content on the server's web page.

The RaceCommittee App is set up as an optional dependency of the bundle com.sap.sailing.www. This way the app will be build before the www-bundle. After the install phase the RaceCommittee App bundle will copy its artifact APK into com.sap.sailing.www/apps. The contents of this folder are packaged into the com.sap.sailing.www plugin, which will be deployed as the server's web page. When build with buildAndUpdateProduct.sh an additional version information file is stored alongside the APK. Version information is taken from the AndroidManifest.xml (android:versionCode).

On synchronizing the connection settings (see administrator's guide) the RaceCommittee App downloads the version file to determine whether it should update itself or not. The file is expected to be found on {SERVER_URL}/apps/{APP_PACKAGE_NAME}.version (e.g. http://ess2020.sapsailing.com/apps/com.sap.sailing.racecommittee.app.version). If the version file is not found, no update will be performed.