Apps-android-commons: Nearby Tab Accessible Without Location Permission

Created on 6 May 2020  路  18Comments  路  Source: commons-app/apps-android-commons

Summary:
When the user has not granted permission for location, the nearby tab can still be accessed when performing the appropriate steps - displaying the nearby tab and map without any results. To prevent the displaying of the nearby tab without any results in this case, the edge cases that allow for the user selecting the nearby tab without the location permission (no location data) need to be fixed.

This issue was discovered when attempting to reproduce the blank nearby list issue (#3727) @neslihanturan

Steps to reproduce:

  1. Make sure the app does not have the location permission
  2. While logged in, select the "Nearby" tab of the "Home" screen
  3. Deny the access to location
  4. Select "No" to the permission request dialog
  5. Select the "Nearby" tab again
  6. Tap away from the dialog to make it disappear
  7. Observe that there are no results

Screen-shots:
No results map screenshot:
nearbyNoResultsMapScreenshot

No results list screenshot:
nearbyNoResultsListScreenshot

Would you like to work on the issue?

I would like to work on this issue.

assigned enhancement

Most helpful comment

@Pratham2305 It is yours. :) Please keep us updated on your progress.

All 18 comments

Yes @nathanmeade , you understood the issue right. User should never see this empty map at all.

Hello! Is this fixed?

I was thinking about some possible solutions to this problem:

  • Add an extra message telling the reason why is location permission important (using shouldShowRequestPermissionRationale). I found this useful information (https://stackoverflow.com/questions/30719047/android-m-check-runtime-permission-how-to-determine-if-the-user-checked-nev)
  • If the user doesn't grant permission we can replace the map fragment with another fragment and inside place a button to have quick access to grant the permission for location.

Let me know your thoughts, have a nice day

Thank you for suggestions @gerardolgvr , the issue is still not fixed. You can work on this one. I think ideal solution is sending the user back to contributons fragment when permission is not given.

oh yeah, sounds a great idea @neslihanturan

Thanks

@neslihanturan @gerardolgvr I have not been able to get to this fix yet. Feel free to reassign this as you see fit.

Hi! I would like to take it if you don't mind, I already have thought a solution, just waiting for you, to give me green light :) @neslihanturan @gerardolgvr

Please go for it @Anyrob :)

Thank you @nathanmeade for your time and reporting your unavailabilit :)

Thank you!! @neslihanturan

Go ahead @Anyrob ! :D

Hi, @neslihanturan! I was wondering if you have had a chance to check my pull request. This time, I was trying to add some test but I ran into a lot of problems since other tests are broken even though I try different ways (even with espresso which also helped me discover another bug in the application) I did not find a way to perform the test in any way other than manual, do you have any recommendations for me?

I think ideal solution is sending the user back to contributons fragment when permission is not given.

I doubt whether that's an ideal solution given that we have a "Search this area" feature. I wonder why there should be a hard requirement on the location permission when Nearby could be used to browse places even without the location permission, as I understand it. 馃

I wonder why there should be a hard requirement on the location permission when Nearby could be used to browse places even without the location permission, as I understand it

I'm not sure if the Mapbox SDK itself requires location permissions to function, but if it doesn't, that could be a possibility. However, which section of the globe should we display initially to the user if we don't know where they are? ;)

I'm not sure if the Mapbox SDK itself requires location permissions to function, but if it doesn't, that could be a possibility.

Sounds great!

However, which section of the globe should we display initially to the user if we don't know where they are? ;)

I think we already know the answer to that, "Tower of London":
Screenshot_2020-07-03-23-07-47

This is location that the app shows now before it gets the actual location of the user (i.e. when the GPS is turned off, GPS is triangulating user's location etc.). Alternatively, we could follow what the Wikipedia app did in this case when it had the Nearby feature ;-). To the best of my memory, it showed the zoomed-out globe view in these cases.

Hi! I would like to work on this.
I agree with @sivaraam, I think we can initially show a zoomed out map and if the user allows the permission then we can zoom to the user's location otherwise, we can still enable the "search this area" button and allow the user to use it and upload images.

Hi @Pratham2305 , sorry for the slow response! Are you still interested in working on this?

I agree with you and @sivaraam , the "search this area" button should be allowed regardless, and pins should still be loaded. For the initial area to display, I'm OK with either a zoomed out view, or a random location, or even the Tower of London ;). But if we go with a zoomed out view, we do have a limit on the number of pins that can be loaded, so we will not be able to display all the pins in a zoomed out area.

Also, I just realized that #4198 is a duplicate of the discussion here, so I will close that.

@misaochan Yes, I would love to work on this one.

@Pratham2305 It is yours. :) Please keep us updated on your progress.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nicolas-raoul picture nicolas-raoul  路  4Comments

misaochan picture misaochan  路  4Comments

psh picture psh  路  4Comments

Opsylac picture Opsylac  路  3Comments

madhurgupta10 picture madhurgupta10  路  4Comments