# MobileEventLog
A cross plattform project for android and ios to log events offline everywhere and sync them to sensor. Developed with flutter.

## Minimum Concept
- Config page: Select the collection and get corresponding devices, get all event types. Store all this to a local configuraion.json file. 

- Log 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.
- Synced Event: Show all uploaded events. Optionally filter by device.  


## Questions:
- How to store not uploaded events locally?  Dumping jsons to a file?, ObjectBox,  SharedPreferences, 


## Local Base Data Concept
- The configuration.dart age 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.dart page.
- This "base data" needs to be stored persistently, so that it is available also 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.

## View & Sync Page
- Events added on the addevent.dart page have to be stored locally persistently. They can be displayed in the view
  events widget. Each event has a flag which shows if the event is already exported to sensor.
  Shall exported events be displayed here? Slide switch to also show exported events?
- Functionality to export events locally for backup in the field! 


## 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"


## GNSS
- Switch on add event page which activates GNSS locationing. A field shall signal "no fix" or presision in meter. 
The fields lat, long, elevation and timestamp are updated automatically if checkbox is checked. 



# Input validation 
a-z , A-Z , _ , 0-9 , ,(Comma) , ( , ) , + , - , . , : 
-90 => Latitude <= +90
-180 => Longitude <= +180
 Elevation: any numer
 
 
 
## TODOs
- FlutterSecureStorage   for user password?