Comments (5)
To properly implement #96 and #102 without any workarounds for the validity check of staypoints, we need to know when tracking was started and stopped. At the moment, it's not possible to distinct between a long stay at one point because the user has not moved from the situation where the tracking was simply stopped (explicitly by user or because app was stopped / has crashed).
from simport-learning-app.
After looking into the API of the background geolocation plugin, I have identified the following cases:
We can subscribe to start
and stop
events that area triggered when the user toggles location tracking by hand (the happy path).
The more interesting cases are the not so happy paths:
-
App is closed / killed: In Ionic, we don't seem to have a way of finding out if our app is currently being killed by the OS. Thus, we can not record a
stop
here. We are only able to detect if the app is put into background and if the background geolocation plugin switches into background mode (and keeps tracking the user). -
Then, we have another case related to the background geolocation plugin: We have set
stopOnTerminate: false
. Which means when the tracking runs, the app is closed / killed and then opened again, the background tracking continues (thus the user does not need to start the tracking again by hand). However, this case would be something we would need to detect by hand since no callback is available here.
from simport-learning-app.
Todos:
- analyse lifecycle of start and stops on Android and iOS
- implement persistence
from simport-learning-app.
Analysis of location tracking start and stop behaviour:
- we can detect start / stop when manually triggered (start and stop events are fired)
- iOS:
- start tracking, kill app (swipe away) -> start app again -> previous running state is persisted + no tracking started event -> indicator for marking last known location as stop and / or the latest location as start
- Android:
- start tracking, stop app (swipe away) -> start app again -> previous running state is persisted -> indicator for marking last known location as stop; issue here: tracking does actually not resume for whatever reason (click on stop button twice and start again, probably related to #97)
- start tracking, kill app (via "Force stop" in options menu) -> start app again -> running state is false -> need to restart tracking by hand; situation two times start in a row
from simport-learning-app.
Maybe it could actually suffice to save start events only?
from simport-learning-app.
Related Issues (20)
- Update filter view? HOT 1
- Enhance inference list HOT 1
- Publish updated App in Google Play Store beta lane HOT 1
- Example trajectory does not load in freshly installed app
- Adjust filter view HOT 3
- Check current dev state: Is feature set complete? HOT 4
- Replace inference info toast with modal HOT 2
- Update inference quality indicator HOT 1
- Cluster inference markers HOT 2
- Adjust wording on inference page/modal and filter view HOT 1
- Replace continuous inference indicator with discrete indicator?
- Export creation, last edit date and date set by user in diary export
- remove compute inferences button on map for study setup
- adjust staypoint clustering parameters for POI computation
- remove notification toggle from tracking menu
- research: When do we toggle notificaitons? HOT 1
- Filter on map: No text for English translation? HOT 4
- Tweak inference and POI computation HOT 1
- check inference indicator bar HOT 1
- fix export of diary/trajectory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simport-learning-app.