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

Better handling of location permissions #360

Conversation

KennyHuRadar
Copy link
Contributor

@KennyHuRadar KennyHuRadar commented May 22, 2024

Right now we have clobbered the example app to make a demo utilizing the new location permissions manager. We will revert that change.

@KennyHuRadar KennyHuRadar requested a review from lmeier May 28, 2024 18:03
@KennyHuRadar KennyHuRadar changed the title [WIP] Better handling of location permissions Better handling of location permissions May 28, 2024
@KennyHuRadar KennyHuRadar marked this pull request as ready for review May 28, 2024 19:00
@@ -53,20 +53,26 @@ class MyRadarReceiver : RadarReceiver() {

override fun onLocationUpdated(context: Context, location: Location, user: RadarUser) {
val body = "${if (user.stopped) "Stopped at" else "Moved to"} location (${location.latitude}, ${location.longitude}) with accuracy ${location.accuracy}"
notify(context, body)
// notify(context, body)
Copy link
Contributor

Choose a reason for hiding this comment

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

why comment these out?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Commenting out stuff in the example app as I'm clobbering it for the sake of building the android demo. I plan to revert all changes made to the example app before merging.

Comment on lines +70 to +71
implementation "androidx.activity:activity:1.2.0"
implementation "androidx.fragment:fragment:1.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

note: check which version of android is required for these

Copy link
Contributor

Choose a reason for hiding this comment

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

@KennyHuRadar mind doing that really quick?

sdk/src/main/java/io/radar/sdk/Radar.kt Show resolved Hide resolved
context: Context,
status: RadarLocationPermissionStatus
) {
onPermissionsUpdated(context, status)
Copy link
Contributor

Choose a reason for hiding this comment

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

plural

}

/**
* @return A RadarPermissionsStatus object with the current location permissions status.
Copy link
Contributor

Choose a reason for hiding this comment

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

plural

internal fun sendLocationPermissionStatus(status: RadarLocationPermissionStatus) {
receiver?.onLocationPermissionStatusUpdated(context, status)

logger.i("📍️ Radar location permissions updated | status = $status")
Copy link
Contributor

Choose a reason for hiding this comment

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

plural

Copy link
Contributor

@lmeier lmeier left a comment

Choose a reason for hiding this comment

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

well done

@KennyHuRadar KennyHuRadar merged commit a5faae5 into master May 31, 2024
1 check was pending
@KennyHuRadar KennyHuRadar deleted the kenny-hu/fence-1912-modified-example-app-without-changes-to-sdk branch May 31, 2024 19:44
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.

None yet

2 participants