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

Show compass in home nearby banner #2239

Closed
nicolas-raoul opened this issue Dec 27, 2018 · 28 comments · Fixed by #5433
Closed

Show compass in home nearby banner #2239

nicolas-raoul opened this issue Dec 27, 2018 · 28 comments · Fixed by #5433

Comments

@nicolas-raoul
Copy link
Member

Showing the nearest item is a great call to action.
But it only says like "200 meters", so the hardest thing next is to figure out in what direction to head.
I suggest showing an arrow that shows the direction.
Of course, it will not work great when the phone is held vertically.

@nicolas-raoul nicolas-raoul changed the title Show compass in home nearby banner? Show compass in home nearby banner Feb 5, 2019
@mumtazcem
Copy link

hello, I am working on it

@maskaravivek
Copy link
Member

As of now showing directions/routes in the app is still debated in #2424.

It might be better to show a directions icon clicking on which fires a map intent with the route. Also, I sometimes feel that we should have more CTA options in the card itself. Maybe the same set of options which are shown on tapping a nearby item in the list.

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Feb 18, 2019

@maskaravivek While directions are debated, I don't think the present enhancement is controversial?

Here is how it could look like. The white arrow is a kind of compass that points to the item when the phone is held horizontally. Walk in that direction for 25 meters and you will reach the item. When you turn the phone, the arrow turns too:

adb-screenshot

@ronanb80
Copy link
Contributor

ronanb80 commented Mar 3, 2019

Is this issue finalized and not assigned?

@nicolas-raoul
Copy link
Member Author

@mumtazcem Are you still working on this? Please inform us about your progress, or if you have abandoned the task then @ronanb80 will work on it. Thanks! :-)

@nicolas-raoul
Copy link
Member Author

@ronanb80 If there is no news from @mumtazcem within 24 hours, the issue becomes assigned to you. Meanwhile how about you research how to extract mediawiki captions for #2337 ? :-)

@mumtazcem
Copy link

mumtazcem commented Mar 8, 2019

hello, I am deeply sorry that I could not update you guys.. Due to homeworks and midterms for the last two weeks I could not check my emails.

However, I was able to implement 'Bearing' which is explained here successfully. Using this method I am able to calculate the bearing between given two points.

By checking the bearing value, cardinal directions (N, E, NE etc.) with precision 2 would be printed to the view just as @nicolas-raoul expected and can be observed below. Direction would be printed as string for now, I can update it with compass or with simple arrow.

compass

@nicolas-raoul
Copy link
Member Author

Thanks for sharing your progress!
Yes, a compass (or simple arrow) is needed, because when walking in the street it can be difficult to tell where North-East is, and on the opposite it is easy to go in the direction of an arrow.
Thanks!

@mumtazcem
Copy link

New update, I added compass icon. Icon would be rotated with calculated bearing value. Below you can observe that icon is rotated 73 degrees exactly.

compass_icon

This is the map as well.

compass_nearby

@mumtazcem
Copy link

Here I added some more examples. If the design and the icon are acceptable for you guys @nicolas-raoul , I can make a pull request for my changes.

1. First example
Screenshot_1552245520

Screenshot_1552245613

2. Second example
Screenshot_1552246796

Screenshot_1552250277

@nicolas-raoul
Copy link
Member Author

nicolas-raoul commented Mar 11, 2019

@mumtazcem
Great start!

If you turn your phone 30 degrees to the right, does the compass turn 30 degrees to the left to compensate?
If it does not, you should use Android's internal compass/orientation and include that in the calculation.

The idea is that if you hold your phone horizontally, the arrow points in the direction in which you must walk. So you can start walking even if you have no idea where the north is.

@mumtazcem
Copy link

I actually never thought about that :). I assumed that this compass would help user to find out the nearest location in Nearby section. Thank you for your feedback, I will update you as soon as possible.

@nicolas-raoul
Copy link
Member Author

Thanks, and sorry for my approximate explanation :-)

@nicolas-raoul
Copy link
Member Author

@nicolas-raoul
Copy link
Member Author

This is maybe the closest code to what we are trying to achieve:
https://github.com/metinkale38/prayer-times-android/blob/bfc080918d68e3b0d2bda0ba0ab98b96f614e399/features/compass/src/main/java/com/metinkale/prayer/compass/_2D/Frag2D.java#L69
It displays an arrow that shows the direction of the Kaaba, Muslims can just look at the arrow and pray in the right direction. We would just have to replace the Kaaba's coordinates with the item's coordinates.

@mumtazcem
Copy link

Not unfortunately all phones (mine samsung galaxy J5) have a magnetic sensor. I finally borrowed one for this project that is why I could not update you guys...

However, since having a magnetic sensor is possibility, should I alert the user if they have a magnetic sensor or not? If a phone does not have a magnetic sensor, then the compass would work just as I described above in current situation.

@nicolas-raoul
Copy link
Member Author

If the phone does not have any way to find the direction, then please just hide the arrow.
Thanks! :-)

@LuGO0
Copy link

LuGO0 commented Jan 19, 2020

can I work on this issue is it still assigned??

@nicolas-raoul
Copy link
Member Author

@mumtazcem Are you still working on this? Feel free to commit or even post here any source code you might have. Thanks! :-)

@LuGO0
Copy link

LuGO0 commented Feb 8, 2020

Can I take it up now?!

@318anushka
Copy link
Contributor

@nicolas-raoul if nobody is working on this issue i would like to take it.

@nicolas-raoul
Copy link
Member Author

Hi @LuGO0 and @318anushka,
Sorry for the late reply!
@LuGO0: OK feel free to work on it, as mumtazcem seem to not be around anymore. Good luck, let us know about your progress :-)

@XxBrezxX
Copy link

XxBrezxX commented Jul 4, 2023

Hi, is this issue taken? If not I would be happy to try a solution!, btw, if u could give me more details, ill be glad :))

@nicolas-raoul
Copy link
Member Author

@XxBrezxX Please focus on one issue at a time :-) Thanks for your enthusiasm!

@ShashwatKedia
Copy link
Contributor

@nicolas-raoul I would like to work on this issue

@nicolas-raoul
Copy link
Member Author

@ShashwatKedia It is yours, thanks! :-)

@ShashwatKedia
Copy link
Contributor

@nicolas-raoul I've implemented the required changes. Kindly review the PR :-)

nicolas-raoul added a commit that referenced this issue Jan 15, 2024
#5433)

* Resolves issue #2239 by adding an arrow for direction

* Removed unnecessary change in styles.xml

* spacing

* javadoc

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
ShashwatKedia added a commit to ShashwatKedia/apps-android-commons that referenced this issue Jan 15, 2024
…nearest item (commons-app#5433)

* Resolves issue commons-app#2239 by adding an arrow for direction

* Removed unnecessary change in styles.xml

* spacing

* javadoc

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
nicolas-raoul added a commit that referenced this issue Jan 15, 2024
* Resolved issue #4513

* Localisation updates from https://translatewiki.net.

* NearbyParentFragment : added referer (#5417)

* NearbyParentFragment : added referer

In file NearbyParentFragment.java, I added header property, i.e., the referer - http://maps.wikimedia.org/
and set tile source to wikimedia.

* Reworded comments

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>

* Localisation updates from https://translatewiki.net.

* Localisation updates from https://translatewiki.net.

* Removed butterknife from the quiz result activity (#5425)

* ConnectRefuseError: removed the proxy from properties.gradle file to allow downloading of build tools during CI. (#5434)

* NearbyParentFragment : added referer

In file NearbyParentFragment.java, I added header property, i.e., the referer - http://maps.wikimedia.org/
and set tile source to wikimedia.

* Reworded comments

* sdkmanager: added installation command for build-tools-30.0.3

* Revert "sdkmanager: added installation command for build-tools-30.0.3"

This reverts commit b3e5019.

* Update android.yml

* Update gradle.properties

* android.yml: removed extra debug commands

Removed some debug commands because they are no longer needed.

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>

* Removed butterknife and inlined a couple of tiny methods (#5426)

* Resolves #2239 by adding a compass arrow for direction of nearest item (#5433)

* Resolves issue #2239 by adding an arrow for direction

* Removed unnecessary change in styles.xml

* spacing

* javadoc

---------

Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>

* Added voice input for caption and description (#5415)

* Fixed Grey empty screen at Upload wizard caption step after denying files permission

* Empty commit

* Fixed loop issue

* Created docs for earlier commits

* Fixed javadoc

* Fixed spaces

* Added added basic features to OSM Maps

* Added search location feature

* Added filter to Open Street Maps

* Fixed chipGroup in Open Street Maps

* Removed mapBox code

* Removed mapBox's code

* Reformat code

* Reformatted code

* Removed rotation feature to map

* Removed rotation files and Fixed Marker click problem

* Ignored failing tests

* Added voice input feature

* Fixed test cases

* Changed caption and description text

---------

Co-authored-by: translatewiki.net <l10n-bot@translatewiki.net>
Co-authored-by: Rohit Verma <101377978+rohit9625@users.noreply.github.com>
Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
Co-authored-by: Paul Hawke <paul.hawke@gmail.com>
Co-authored-by: Kanahia <114223204+kanahia1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants