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