-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[WIP] changed confusing message about location permission(#2011) #2305
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
Conversation
Sure :) |
Codecov Report
@@ Coverage Diff @@
## master #2305 +/- ##
=========================================
- Coverage 6.42% 6.41% -0.01%
=========================================
Files 236 236
Lines 11537 11549 +12
Branches 1049 1049
=========================================
Hits 741 741
- Misses 10735 10747 +12
Partials 61 61
Continue to review full report at Codecov.
|
It would be nice if this could also be tested with an Android device running Android 5 or less as the issue #2011 was filed mainly because a confusing message about permissions was shown in a device running an Android version which does not support runtime permissions (yeah, I'm not asked to allow or deny when the requests access to my location etc.). I'm trying to test this as I have a device running Android 5.1.1 but it would be great if someone could test this before me :-) Also, IIUC from the screen shots posted the when the user visits 'Nearby' the dialog in the first screen shot is shown. If he hits on 'Cancel' in it then pop-up in the second one would be shown. Is that right? If yes, I'm not sure how this improves the status quo. Adding another dialog just seems to be worsening it. I guess an improvement would be to avoid drop the first pop-up in the first one. That would reduce the frustration a little. Also, I had another doubt. Given that #591 has been closed, does asking for the GPS permission as a mandatory requirement make sens? I think it could be made optional which would make Nearby even more useful. |
@maskaravivek Done reusing DialogUtil for displaying this dialog. |
@sivaraam Actually the screenshots are of an emulator running android 5.1. I had already tested on this emulater and also on my device. |
app/src/main/java/fr/free/nrw/commons/nearby/NearbyFragment.java
Outdated
Show resolved
Hide resolved
app/src/main/java/fr/free/nrw/commons/nearby/NearbyFragment.java
Outdated
Show resolved
Hide resolved
The "GPS dialog" suggests that the app has location permissions(on Android 5 it has it by default) but the app wasn't able to fetch the location. If the app has location permissions it checks if the GPS provider is enabled:
If the So the dialog is not about location permissions. It is trying to check if you have enabled location services on your device or not. |
@sp2710 It might be good to have a dialog that informs the user that GPS is required for the feature. I just don't find how the first dialog which plainly states "GPS is disabled" is useful now. It's better not to have subsequent pop-up dialog. In this particular case, the first dialog seems useless, at least to me. So, it would be nice to drop it. Just to give an idea. If the first dialog is dropped, the flow should be something like:
Hope that clarifies what I'm trying to say. Let me know if it doesn't. |
There seems to be some confusion as to what the actual issue in #2011 is. The issue is not about the "GPS is disabled .." dialog that is shown. It is about the "Nearby places cannot be displayed without the location permissions" dialog. I'm not sure when that dialog is shown but the message made me think it is shown incorrectly for device running Android < 6. I suggested to test it in a device running Android < 6 just to ensure the dialog is not shown anymore (I've just tested it and it doesn't seem to be appearing which is fine with my device). This PR seems to have removed that unnecessary dialog about permissions when it removed the call to |
@sp2710 I asked as the fact that it was also tested with a device running Android 5.1 wasn't mentioned in the Tests performed section of the description. |
@maskaravivek I think only one dialog will be sufficient and we should change the message to something like
Would you like to give your suggestions? |
I agree with changing the current message. On API 19, this is what happens if GPS is disabled and I open the app:
Screenshots:
What I think should happen is:
|
@domdomegg So shall i modify my PR according to it? |
I'd be happy to merge it. The one tricky thing might be only requesting location on viewing nearby (step 1), as I think location is used when it tries to get the nearby notification card to display on top of contributions fragment. If the other bits work I'd be happy to merge that and then step 1 can be done separately - whatever is easier. |
@domdomegg IMO for contributions fragment we can show dialog with content
And if in nearby we can show this dialog
|
I don't know if this will be clear as users might not know what the nearby notification is referring too, especially as this message is likely to be the first thing the user experiences when opening the app. Maybe just say something like 'location services need to be enabled if you want to know about nearby places of interest that lack media on Commons' |
Looks nice. |
@sp2710 please do. After a long discussion, this PR seems like ready to be merged after some string refactors. |
IMO, this is no longer needed after #2925 is merged. We can probably close this PR |
Sorry I have missed it @maskaravivek |
Fixes #2011 Nearby: confusing message about location permission
What changes did you make and why?
Added a new Alert Dialog when user taps on "Cancel"
Tests performed (required)
Tested on Motorola Moto G5 plus with API level 24
after tapping on cancel

If the user clicks on cancel again then the user is redirected to contributions activity