Posts: 11
Threads: 5
Joined: Nov 2018
Institution: Innovator
11-10-2018, 02:36 PM
For many purposes, it would make sense to have the app runnable if it is in the background. This should be doable.
Think about this example: I want to collect data about how people interact with their phones when they play a phone game. I active a remote session with phyphox, put the app in the background, and allow the user to play clash of clans. As they play, I trigger a recording in the background and log the data.
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
11-10-2018, 06:58 PM
(This post was last modified: 11-10-2018, 06:59 PM by Sebastian Staacks.)
That is on out todo list, but I cannot really say when we will start working on this and which limitations will apply. The difficulty is rather similar on Android and iOS, but I will describe it in Android terms, which are more familiar to me:
Phyphox currently runs entirely as a so-called "activity" (or, technically speaking several activities), which is code that is tied to the front-end shown to the user. This is started and stopped by the system and there is no way that an activity is executed more than a few moments after it is no longer in the foreground. Actually, we get a notification that the system is about to stop our activity and we only have a few moments to save our work before our code is no longer executed and our data possibly removed from memory.
The alternative is running the data acquisition as a so-called service. These services run without a front-end, but they need to add an icon to the notification area if they want to be executed all the time, so the users knows what is draining the battery. However, there will still be some limitation, some more obvious than others as both Android and iOS try to limit what a service can do as these tend to prevent the phone from going into deep sleep states, thus draining the battery. Other limitation will be access to the microphone and controll over sensor rates when other apps in the foreground try to use them as well.
In any case, the main reason that we cannot "just" add this feature, is that we need to restructure the app, so that the data acquisition and data analysis runs as a service while the user interface remains as an activity. This is a bigger task, which is on the list, but we do not yet know when we will have a look at this.
BTW: Technically, this is almost the same as the more common request to run the app while the screen is off, so people can keep measuring with the phone in their pockets.
Posts: 11
Threads: 5
Joined: Nov 2018
Institution: Innovator
What about the use of an overlay? Is that how messenger does it with the bubble??
Yes, I recognize there are some big hurdles to overcome here... I currently use a lock screen app to prevent the screen from being manipulated when I am doing experiments. Maybe a nice feature would be a way to block out the screen or make the pause/clear buttons more inaccessible to prevent accidental data loss?
Posts: 1
Threads: 0
Joined: Feb 2020
Have you made any progress on this so far?
Posts: 323
Threads: 6
Joined: Aug 2018
Institution: RWTH Aachen University
Nope, sorry, we are still working on other things.
Posts: 1
Threads: 0
Joined: Mar 2020
Hi
+1 for running in background feature.
Apart from that: GREAT app! Thanks for the work you put in here
Posts: 7
Threads: 0
Joined: Dec 2019
Institution: Bristol
11-27-2020, 08:43 PM
(This post was last modified: 11-27-2020, 08:47 PM by lscw.)
(02-12-2020, 01:30 PM)Sebastian Staacks Wrote: Nope, sorry, we are still working on other things.
+1 for this feature too. Although I appreciate just how much work it would be.
In the meantime, for situations where background running isn't essential it would be really great if the app resumed where it left off* rather than starting back at time=0 as can be seen in the image:
* and perhaps saved the time and attempted to resume while leaving a gap in the data?
Posts: 548
Threads: 24
Joined: Apr 2020
Institution: RWTH Aachen University
How did you manage to achieve that on the screenshot? If I resume an experiment, it just adds data to the right, just as you suggest…?
As for the gap: IIRC, we do this on purpose. Perhaps an option could be included in the phyphox file format at some point in the future.
Posts: 2
Threads: 1
Joined: Nov 2020
(11-27-2020, 08:43 PM)I am looking to use a mobile to measure location and vibration in transit so the turning the screen off and background running would be 'a given' in order to do this? Wrote: (02-12-2020, 01:30 PM)Sebastian Staacks Wrote: Nope, sorry, we are still working on other things.
+1 for this feature too. Although I appreciate just how much work it would be.
In the meantime, for situations where background running isn't essential it would be really great if the app resumed where it left off* rather than starting back at time=0 as can be seen in the image:
* and perhaps saved the time and attempted to resume while leaving a gap in the data?