Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cellular only option is ignored when WIFI is turned on #5604

Closed
srujner opened this issue May 23, 2023 · 6 comments
Closed

Cellular only option is ignored when WIFI is turned on #5604

srujner opened this issue May 23, 2023 · 6 comments

Comments

@srujner
Copy link

srujner commented May 23, 2023

ODK Collect version
the PR #5591 version

Android version
10, 13

Device used
Redmi 9T, Google Pixel 6a

Problem description

When I set the Auto send option in Form Management settings to Cellular only and Save as Draft turned off and have both Wi-Fi and Cellular connection turned on then at the end of the form I see the "Finalize" button, but after turning the Wi-Fi off then I see the "send" button. Is this the correct behavior?
Test

@seadowg
Copy link
Member

seadowg commented May 23, 2023

I keep going back and forth in my head about if we should care about the wifi/cellular state for the "Finalize"/"Send" button. An example that makes me lean towards showing "Finalize" in cases where auto send is enabled is something like this:

  1. Enable auto-send with wifi only
  2. Disconnect from wifi
  3. Fill form

In this case the user would see "Send" on the last screen. This is ends up being a problem for two reasons:

  1. They might be worried that the form will send even though they're not connected to wifi
  2. They might think the form will be sent when they do connect to wifi which is incorrect - the instance will only be auto sent if they finalize another form while connected to wifi as we don't reschedule auto send if the network conditions aren't met

Given that scenario, I think I'm keen to stick with the current behaviour of only showing "Send" if we think we're actually going to send the form. That now aside, this case still seems confusing. Given we use the same logic for showing the button as we do for the actual auto send decision, does the same setup (cellular only auto send, wifi and cellular connected) not auto send the form after you hit "Finalize" @srujner?

@grzesiek2010
Copy link
Member

I'm also in favor of keeping the current behavior so only displaying Send if we are really going to send it.

@srujner
Copy link
Author

srujner commented May 25, 2023

@seadowg yes with option cellular only, wifi and cellular(SIM) connected, the form moves to Ready to Send.

@seadowg
Copy link
Member

seadowg commented May 31, 2023

Ok this seems to be a bug then. As far as I understand, the form should be sent automatically if auto send is "Cellular only", wifi is disabled and cellular is connected. Do you agree @grzesiek2010? I just want to check I'm not missing something here.

@grzesiek2010
Copy link
Member

If in settings we have cellular only but the device is connected to both wifi and cellular then the button is Finalized and a form won't be sent. This behavior is consistent and makes sense to me. We are not able to tell whether wifi or cellular will be used to upload our form so if wifi is enabled we block it. As I remember it was something we discussed in the past but it looks like we don't have a test for it in AutoSendSettingsProviderTest so adding that test would be the only thing I would do here.

@seadowg
Copy link
Member

seadowg commented Jun 1, 2023

We are not able to tell whether wifi or cellular will be used to upload our form so if wifi is enabled we block it.

🤯. That is both very simple and very unintuitive. Thanks for clarifying. I think we can close this.

@seadowg seadowg closed this as completed Jun 1, 2023
@github-project-automation github-project-automation bot moved this from not ready to done in ODK Collect Jun 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: done
Development

No branches or pull requests

3 participants