-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Nearby Tab Accessible Without Location Permission #3732
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
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:
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 |
…tion permission is not granted
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 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'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? ;) |
Hi! I would like to work on this. |
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. |
* Added ability to access nearby tab without location permissions * added ability to remember user choice if the permission is denied. * fixed the issue with permission dialog box in contribution tab. * changed name for stored variables * minor change Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
@misaochan @nicolas-raoul I think this issue is not resolved yet. Nearby is still not working without location permission and it also not working if GPS is turned off. Nearby just do nothing if location permission is not there and GPS is not turned on. See this video. networkCommon.mp4(The video is a little old but I tested the app on latest master it behaves the same with a endless progressbar) Tested latest master betaDebug on Samsung J2 API 23 and Pixel 2 emulator API 30 |
I haven't tried on master, but I just tried on 3.1.0~b41882639:
In other words, it seems to work as intended for me. @Ayan-10 would you mind detailing the steps you are using? |
@nicolas-raoul I tested on both Samsung J2 API 23 and Pixel 2 emulator API 30 devices. On master
I waited for 10 minutes but Nearby only showing a spinner spinning. Also, I noticed that If GPS is turned off It behaves the same way. Only spinner spinning nothing happens.
|
@nicolas-raoul So what are expecting from Nearby? I think Nearby should work without location permission and GPS and also Users can add images in any place without location permission and GPS. Users only need to give location permission and GPS when they want to locate themself. Am I right? Please correct me if I am wrong. Thanks. |
Nearby should work without location permission -> yes Users can add images in any place without location permission and GPS -> yes Users who do not have a GPS or do not want to give permission should be allowed to unzoom/pan/zoom to the place they want, and tap |
It seems that |
@Ayan-10 Just trying to figure out what the precise problem you're observing is. Do you see the "Search this area" button when you choose a particular location in the map? If you do see it, do you see no pins even when you zoom to a particular location and use "Search this area" button ? I'm asking this as Nearby would likely do nothing by default without the location permission when you don't use the "Search this area" button.
I tested this on a OnePlus Nord and it appears to be working for me. |
@sivaraam It seems some of the issues that I mentioned here are not occurring now. You can check this comment where I mentioned the issues that were occurring at that time and way of reproducing them in detail. In the current master, "the nearby tab is not working at all without permission and the spinner just spins" this issue seems to be fixed. Now nearby tab is working as expected (By default it's showing the Tower of London and the pins of the location around that area). However, "the nearby tab is not working at all without GPS enabled" this issue is still occurring. When I opened the nearby tab without GPS enabled it shows a toast by saying "Nearby might to work properly, Location not available" and after that nothing happens, I can zoom and pan to any place but no pins are showing, no search button is showing. I hope it should not work like that. Even without the GPS enabled I should be allowed to tap Search this area to see places and see all the location pins in a specific area, and it should already be zoomed to the Tower of London for the first time I open the nearby by default. Moreover, it should work the same as the way nearby is working without permission. Steps to reproduce the issue
Can you reproduce it in the same way? I tested the latest master prodDebug on Realme GT master API 30 and the GPS issue is occurring for me. Thanks |
Yeah. With the steps you mention, I do reproduce the issue where the "Search this area" button is not being shown. This is with 3.1.1~1c9267ca0. So, looks like the app works fine when the location permission itself is not available but fails to show the "Search this area" button if the permission is available but GPS is turned off. Nice catch. |
@sivaraam @nicolas-raoul I have fixed the issue. Can I make the PR? |
@Pratham2305 Are you still working on this? I see you are currently assigned. Thanks! :-) |
Currently No, @Ayan-10 can surely take this since he has already resolved the problem ig :) |
@Pratham2305 Thanks for your sportsmanship! |
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:
Screen-shots:

No results map screenshot:
No results list screenshot:

Would you like to work on the issue?
I would like to work on this issue.
The text was updated successfully, but these errors were encountered: