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

feat: implement Google Map Feature with Location Handling #76

Merged
merged 10 commits into from
Nov 3, 2024

Conversation

Kenzoud
Copy link
Contributor

@Kenzoud Kenzoud commented Oct 31, 2024

  • Implemented GoogleMapScreen to display a Google Map.
  • Added location permission handling to ensure user location is accessible.
  • Displayed a marker at the user's current location, if permission is granted.
  • Integrated bottom navigation menu for better user navigation.

Note: I am still working on the implementation of some tests

@Kenzoud Kenzoud self-assigned this Oct 31, 2024
This was linked to issues Oct 31, 2024
@Kenzoud Kenzoud linked an issue Nov 3, 2024 that may be closed by this pull request
Copy link
Contributor

@raniabbrk raniabbrk left a comment

Choose a reason for hiding this comment

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

Overall, the code looks very well structured and integrates the Google Maps feature effectively. However, I think you could add a small toast message to provide clearer feedback on location access:
-If location permission (ACCESS_FINE_LOCATION) isn’t granted, display a toast message informing users that location access is required for the map to function.
Here's an example of how you can implement it:
if (hasLocationPermission) {
..
} else {
ActivityCompat.requestPermissions(
context as Activity,
arrayOf(Manifest.permission.ACCESS_FINE_LOCATION),
LOCATION_PERMISSION_REQUEST_CODE
)
Toast.makeText(context, "Location permission is required to access the map.", Toast.LENGTH_LONG).show()
}
This addition will enhance user experience.

@Kenzoud Kenzoud requested a review from raniabbrk November 3, 2024 18:11
Copy link

sonarqubecloud bot commented Nov 3, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
2 Security Hotspots

See analysis details on SonarCloud

@Kenzoud Kenzoud merged commit e466a7d into main Nov 3, 2024
1 of 2 checks passed
@Kenzoud Kenzoud deleted the feature/setup-google-maps branch November 3, 2024 18:35
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.

Implement Map tests Implement Location package Implement Map Screen
2 participants