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

Log location coordinates in the background #2772

Merged
merged 98 commits into from
Jan 23, 2019
Merged

Conversation

grzesiek2010
Copy link
Member

@grzesiek2010 grzesiek2010 commented Jan 2, 2019

Closes #2773
Closes #375

What has been done to verify that this works as intended?

I wrote some tests and performed manual testing but it's not enough of course and the pr should be tested carefully by our QAs.

Why is this the best possible solution? Were any other approaches considered?

I tried to follow the approach agreed in getodk/roadmap#28. Overall I was able to do everything as we discussed there apart from the section about Data privacy issues which I implemented in a bit different way.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

The pr brings a lot of changes in old time logging functionality which now allows logging location coordinates as well, so the biggest risk is related to that option.

The code that manages collecting events is in FormEntryActivity so there I also had to implement some changes but It doesn't need any specific regression testing.

Do we need any specific form for testing your changes? If so, please attach one.

AuditTest.xml.txt

Does this change require updates to documentation? If so, please file an issue here and include the link below.

getodk/docs#934

Before submitting this PR, please make sure you have:

  • run ./gradlew checkAll and confirmed all checks still pass OR confirm CircleCI build passes and run ./gradlew connectedDebugAndroidTest locally.
  • verified that any code or assets from external sources are properly credited in comments and/or in the about file.
  • verified that any new UI elements use theme colors. UI Components Style guidelines

…contain not only times but locations as well
…om of the method which finishes loading forms
@smoyte
Copy link

smoyte commented Jan 17, 2019

Agreed, 'Location Tracking' is better.

I think right-aligned may be the norm for mobile. @yanokwa what you linked is for desktop/web UIs I think. See the screenshot I posted higher up...

@yanokwa
Copy link
Member

yanokwa commented Jan 17, 2019

I saw the screenshot. Do you have a source so we can evaluate the context better?

@smoyte
Copy link

smoyte commented Jan 17, 2019

No, sorry. I forgot where I found that :(

@zestyping
Copy link
Contributor

zestyping commented Jan 17, 2019

Great work, @grzesiek2010! I'd like to see the icon on the far left followed by "Location Tracking" (to match the snack bar).

@yanokwa I was just about to say "Yeah, that sounds perfect"—and then I went looking for examples and found this in Chrome on Android:
screenshot_20190117-091036

If the checkbox stays on the right, there needs to be a decent amount of padding between the text and checkbox.

It's a shame to have this not match the snackbar, though. Are we open to putting it on the right in the snackbar?

@smoyte
Copy link

smoyte commented Jan 17, 2019

Wait what? There is a checkbox in the snackbar too? That seems odd to me... There shouldn't be UI controls in an ephemeral element like that. Will cause user anxiety—how to I get back to that??

@zestyping
Copy link
Contributor

Sorry, that was what I thought @yanokwa meant when he said "(to match the snack bar)". Rereading his comment, I'm seeing now that maybe he meant that the text "Location Tracking" should match the snack bar, rather than that the checkbox should match the snack bar.

@smoyte
Copy link

smoyte commented Jan 17, 2019

😅

@yanokwa
Copy link
Member

yanokwa commented Jan 17, 2019

Y'all are confusing me! So to confirm, the two changes we've agreed to make to the PR's UI.

  1. Change the text from Background location to Track Location
  2. Make sure the checkbox, and only the checkbox aligns right.

@grzesiek2010
Copy link
Member Author

Change the text from Background location to Track Location

Fixed.

Make sure the checkbox, and only the checkbox aligns right.

Everything is fine here.

@mmarciniak90
Copy link
Contributor

mmarciniak90 commented Jan 22, 2019

@grzesiek2010 I noticed only that menu icon is not visible in snackbar on Android 4.2 and 4.1
screenshot_2019-01-22-16-12-17

Verified on Android: 8.1, 7.0, 6.0, 5.1, 4.4, 4.2, 4.1

Verified cases:

  • Track Location option in menu is visible only when expected

  • Form with all question on one page. Location for group questions /data is visible

  • Adding new form version with log location coordinates in the background

  • Using form which logs location coordinates in the background on old collect version

  • Manipulated location-min-interval and location-max-age values

  • Google Play Services are not available (Android 4.4)

  • Events:

    • location tracking enabled
    • location tracking disabled
    • location providers enabled
    • location providers disabled
    • location permissions granted
    • location permissions not granted
  • Snackbar:

    • screenshot_2019-01-22-14-43-44
    • screenshot_20190122-142057
    • screenshot_20190122-142107
  • Dialog:

@mmarciniak90
Copy link
Contributor

@opendatakit-bot unlabel "needs testing"

@grzesiek2010
Copy link
Member Author

So it's because some font's don't support that char.
The message looks maybe strange but it's still readable.
@yanokwa should we remove that character or maybe leave it as it is since it's probably only android 4?

Copy link
Member

@yanokwa yanokwa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@grzesiek2010 Please fix the merge conflicts and let's get this merged!

As to the glitch with Android 4, try replacing the with ⋮ and see if that works better. If not, let's file a quick issue to improve it later.

@grzesiek2010
Copy link
Member Author

As to the glitch with Android 4, try replacing the ⋮ with ⋮ and see if that works better. If not, let's file a quick issue to improve it later.

I tried yesterday and no avail. A new issue is added #2813

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants