phyphox / phyphox-ios

Physical Phone Experiments (iOS app)
GNU General Public License v3.0
50 stars 16 forks source link

Bug: MQTT-Experiment cannot be stored persistently on Android #16

Open normanius opened 1 year ago

normanius commented 1 year ago

Yet another (MQTT-related bug:

On Android, I can import the attached file (that includes the specs for a MQTT network connection). The experiment opens, and is functional. However, the experiment is not stored persistently in Phyphox. After closing the experiment, it is not listed in the list of available experiments.

However, if we remove MQTT from the phyphyx file, this problem does not exist: The experiment is stored after importing it from a file.

Find attached two files with and without mqtt. mqtt-phyphox-experiment.zip

Staacks commented 1 year ago

I assume, that this is about the "add to collection" dialog that opens automatically? There are two ways that an experiment can be added to the list:

I know of a bug that prevents the first dialog from showing up if the data privacy dialogue is shown (which is the case if MQTT is used). So, am I correct in guessing that the problem is that the dialogue does not show, but you could still add it via the three-dot menu?

Staacks commented 1 year ago

Actually, this is not a bug, but was by design as I thought that to many dialogues after opening an experiment would be annoying, but I added changing it onto my todo list after I learned from participants in a workshop that they were not aware that there is an alternative method.

And by the way: For your usecase it might also be interesting to know that you can put multiple experiments into a zip file and open that in phyphox. This will open a dialogue with a list of all experiments in the zip file along with an option to add all to the collection at once.

normanius commented 1 year ago

Hi, thank you for your the hint. We were not aware of the alternative possibility of adding an experiment. Thanks for mentioning it, it solve our issue. Please close this issue if you keep track of these workflow related issues elsewhere.

I know of a bug that prevents the first dialog from showing up if the data privacy dialogue is shown (which is the case if MQTT is used). So, am I correct in guessing that the problem is that the dialogue does not show, but you could still add it via the three-dot menu?

Actually, this is not a bug, but was by design as I thought that to many dialogues after opening an experiment would be annoying

All this is coherent with what I've described. The alternative way was not known to us. The privacy dialogue and the suppression of the other dialogue ("wanna add to list?") kind of breaks the "load experiment and confirm to add" workflow one gets accustomed to very quickly. It's a bit unexpected for a user that because of adding MQTT to the experiment, this workflow changes into "load and do an extra step to add the experiment".

Maybe you can change the trigger for the privacy message? For example how about having pop it up when starting the experiment (i.e. by clicking the "play" button) for the first time?

Staacks commented 1 year ago

Unfortunately, the privacy notice has to pop up pretty much immediately because phyphox can also execute an analysis cycle (and submit the result) before the play button is pressed. This is for example used to calculate the wave form of the "tone generator" which is shown as a preview before the user presses start and it could also be used for example to show the status of a server that coordinates experiments.

I think, simply showing the "wanna add to list" dialog in addition to the privacy notice is the most consistent solution.