Coder Social home page Coder Social logo

Comments (5)

zven avatar zven commented on June 30, 2024

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.

zven avatar zven commented on June 30, 2024

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:

  1. 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).

  2. 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.

zven avatar zven commented on June 30, 2024

Todos:

  • analyse lifecycle of start and stops on Android and iOS
  • implement persistence

from simport-learning-app.

zven avatar zven commented on June 30, 2024

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.

zven avatar zven commented on June 30, 2024

Maybe it could actually suffice to save start events only?

from simport-learning-app.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.