# MobileEventLog
A cross plattform project for android and ios to log events offline everywhere and sync them to sensor. Developed with flutter. A short how to use can be found below documentation/README.md
<br /> 
![Add a new Event](documentation/05_AddEvent_01.JPG)
<br />

## Concept
- Config page: Select the collection and get corresponding devices, all event types. Store all this to a local persistent configuraion. 
- Add Event Page: Allow selection of a device and adding a new event with all details. Add button adds the event to the staged events. Fields are not cleared but kept as they are. 
- Staged Event: Show all entered and not yet uploaded events. Allow modification of all fields here. Alternatively show all events including uploaded once.  

## Local Data Concept
- The configuration widget is used to get the online available information for available devices and event creation. 
- This includes: All collections, All devices part of a selected collection, Event operation types
- This "base data" is required to provide the dropdown menu options on the addevent page.  
- This "base data" is stored persistently, so that it is also available offline!

## Add Event Page
- Usw Switch for automatic GNSS and Time update. 
- Show "now" time button only if GNSS is disabled. This button shall fill the timestamp with the current utc time.
- Add stores the event to a local sql database
- A slide switch activates GNSS locationing. A field shall signal the GNSS status "no fix" or "x m presision". The fields lat, long, elevation and timestamp are updated automatically if GNSS is enabled.
- Input validation is done according sensor.awi.de Free Text: "a-z , A-Z , _ , 0-9 , ,(Comma) , ( , ) , + , - , . , :"  -90 => Latitude <= +90  -180 => Longitude <= +180  Elevation: any numer

## View & Sync Page
- Events added on the addevent page are stored persistently (sql database). They can be displayed in the view
  events widget. Each event has a flag which shows if the event is already exported to sensor. A slide switch allowes to show all events?

## Configuration Page
- Switch to select if Mission or Collection based.
- Dropdown "Collection" to select a collection / mission
- Button "get Collection devices from Sensor"
- Button "store Collection devices locally"
- Select a Mission from the new Sensor-Mission-Management to get a set of devices.
- Username und passwort. "Test login on store even if  not required here"
- Functionality to export events locally for backup in the field! 


## TODOs
- Allow adding an event to more than one device (urn)!    "make UrnId => UrnIds"  sync a event to every listed urn.   ?  Really needed?
- Compile an Apple iOS version.
- On older Android 6 Devices the following error is shown"  OS Error CERTIFICATE_VERIFY_FAILED: certificate has expired".   Fix or require at least Android x? 
- Add Git Tags as version information and show in app.  
- Implement switch to select sandbox or productive version?  

## UI Feedback
- Colors  
DAM Arctic: #00afb9
DAM Ocean: #0f1e50

Feedbackpopups:
Background: #CEEDEB
Text: #57827E

- Add Impressum: CC-BY licence:  AWIs address?  Check with Christoph Wagner. 

# Configuration
- animated Feedbackpopup on first line : "speech bubble" (Download successfull)  Show pop up for 2s. "Detail information as is below the collection dropdown menu. 
- Collection List Drop Down. Item separation "grey line"  +  Abbort button. "Highlight  "chosen collection" italic or pinned on top. Sort alphabetic.  

# Add Event
- Show \* next to lable for required fields. 
- Event Type /URN   Item separation and hightlighting chosen type as in configuration.
- Is a field for end time required here?  

# View & Events
- "All Events" "Pending Events" on first line above table. Alligned right.  50pix hight distance to table start. 
- Multiple lines for one event to reduce width.   Alternative: Do not show all event details in table but show them in a separate widget on selection. This could also be the view to edit event details.  
- Edit mode. Select an event and open event in edit mode with all event details
- Allow to remove pending events. 
- Feedback "Success" to line above table and below top bar. 


# Overview
- Add Icon to Add, View and Configuration button. Then use uppercase Text.