Skip to content

rromanowicz/archery-session

Repository files navigation

Archery Session


1. Navigation

  • Top bar

    • <- Back
      • Back button will bring you to previously viewed screen, not main screen.
    • New Session
    • History
    • Statistics
    • Settings

  • Floating button

    • New Session
    • History
    • Statistics
    • Settings

2. Main screen

Summary of the last Session

  • ID
  • Start date/time
  • End date/time
  • Bow
  • Number of ends
  • Number of arrows
  • Average arrow value
  • All ends details with sum of points
    • Section is scrollable if number of ends exceed screen size.
  • Statistics
    • Bar chart showing percentage of shots per point value
    • Pie chart showing percentage of shots per point value
    • Line chart showing sum of points for each end in session

3. New Session

  • Bow selector

    Select bow for current session Dropdown list

  • Start Session

  • End Session

    End Session button will be inactive when no session is in progress. While session is active Start Session button will be disabled and End Session > will be active.

  • Current session details

  • Session Time

  • Ends

  • Arrows

    Session Time will start counting when Start Session button is pressed Ends and Arrows will be calculated after adding scores.

  • While session is in progress top bar will be hidden and back button will be > disabled. Floating button will be replaced with + button to add scores.

  • Adding scores (+ button)

    • After pressing button, a popup will appear to provide arrow scores for given end.
      • Standard scores are available (0, 6-10).
    • Input all scores by hitting corresponding buttons and select Submit.
    • In case of mistakes, <x button will erase last provided input.
    • Summary at the top of the popup will show number of arrows, total score and all > given inputs.
    • After selecting Submit, the summary will appear in underlying view with number > of current end.
      • Section is scrollable if number of ends exceed screen size.
  • Pressing End session button will display confirmation dialog

    • Confirm will end session, stop the timer, restore top bar and back button functionality
    • Cancel will close dialog window
  • Given session is saved to history and will be available on main screen until next session end.


4. History

  • History view shows a compact list of all sessions

    • ID
    • Date
    • Number of ends
    • Number of arrows
    • Average arrow points
  • Selecting a session will open a popup with all of the above and details of each > end.

    Popup has 2 additional buttons

    • Top right corner - Close button
    • Bottom right corner - Delete button Delete button will close the popup and remove session from history

5. Statistics

  • Data from last 10 sessions
  • Bar chart showing percentage of shots per point value
  • Pie chart showing percentage of shots per point value
  • Line chart showing average shot points for each end in session

6. Settings

Your bows

  • Bows

    Add/Edit bow

    • Name
    • Description
    • Length
    • Brace height
    • Top tiller
    • Bottom tiller

    Edit window has the Delete button


7. Behind The Scenes

  • Application uses 2 separate data storage options

    • SQLite embeded database

      id session_json
      4 {"numberOfArrows":12,"endDate":"Dec 28, 2021 9:44:08 > PM","numberOfEnds":2,"endScores":[[10,9,8,9,10,10],[9,8,9,7,10,6]],"startDate":"Dec > 28, 2021 9:43:50 PM"}}

  • ../'Internal Storage'/Documents/archerySessions.txt

    • Hence the need for File Access permission.

      {
          "sessionId": 4,
          "sessionDetails": {
              "numberOfArrows": 12,
              "startDate": "Dec 28, 2021 9:43:50 PM",
              "endDate": "Dec 28, 2021 9:44:08 PM",
              "numberOfEnds": 2,
              "endScores": [
                  [10,9,8,9,10,10],
                  [9,8,9,7,10,6]
              ],
              "bow":{
                  "id":1,
                  "name":"BowName",
                  "description":"BowDescription",
                  "length":68,
                  "braceHeight":21,
                  "bottomTiller":0,
                  "topTiller":0
              }
          }
      }
    • Application only uses embedded database to display data. Text file is a backup.

    • If .txt file exists before installing the app (i.e. re-installation) data will > be automatically pulled into db and shown in app.

    • If there are discrepancies between .txt file and db application will > automatically synchronize the data in both and fill the gaps.

    • Deleting sessions from history will remove it from .txt file and db