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

Share location with other apps (PSG-242) #6567

Merged
merged 4 commits into from
Jul 19, 2022

Conversation

onurays
Copy link
Contributor

@onurays onurays commented Jul 15, 2022

Type of change

  • Feature
  • Bugfix
  • Technical
  • Other :

Content

Users can now open others' (or their own) live locations with other map applications by tapping the marker of the users. Shared location is the static location at the time users click to share button.

Motivation and context

Screenshots / GIFs

Share location Open with
share_location share_location_2

Tests

  • Share a live location
  • Click on timeline item to open maximized map
  • Click on user's marker on the map
  • You should see the "share" action

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

@onurays onurays changed the title Share location with other apps Share location with other apps (PSG-242) Jul 15, 2022
@onurays onurays requested review from a team and Claire1817 and removed request for a team July 15, 2022 12:46
isFocusable = true
isTouchable = true
elevation = 8f
setBackgroundDrawable(ContextCompat.getDrawable(context, R.drawable.bg_live_location_marker_popup))
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add the background directly in the view_live_location_marker_popup.xml file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It works, thanks, done.

inputMethodMode = INPUT_METHOD_NOT_NEEDED
isFocusable = true
isTouchable = true
elevation = 8f
Copy link
Contributor

Choose a reason for hiding this comment

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

the same for the elevation ? add it directly in the xml file ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exactly, done.

var callback: Callback? = null

init {
contentView = inflater.inflate(R.layout.view_live_location_marker_popup, null, false)
Copy link
Contributor

Choose a reason for hiding this comment

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

i have a warning on Android Studio:

Avoid passing null as the view root (needed to resolve layout parameters on the inflated layout's root element)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.


fun show(anchorView: View) {
contentView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED)
showAsDropDown(anchorView, -contentView.measuredWidth / 2, 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe add a comment to explain the:

-contentView.measuredWidth / 2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added.

@onurays
Copy link
Contributor Author

onurays commented Jul 19, 2022

Thanks @Claire1817 for reporting bugs related to marker rendering when the user doesn't have an avatar. #6594 will be fixed in another PR.

@onurays onurays requested a review from Claire1817 July 19, 2022 12:17
Copy link
Contributor

@Claire1817 Claire1817 left a comment

Choose a reason for hiding this comment

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

thanks for the update :)

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@onurays onurays merged commit 9976b3b into develop Jul 19, 2022
@onurays onurays deleted the feature/ons/share_location_with_other_apps branch July 19, 2022 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants