-
Notifications
You must be signed in to change notification settings - Fork 19
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
Better handling of location permissions #360
Conversation
@@ -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) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why comment these out?
There was a problem hiding this comment.
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.
implementation "androidx.activity:activity:1.2.0" | ||
implementation "androidx.fragment:fragment:1.3.0" |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
context: Context, | ||
status: RadarLocationPermissionStatus | ||
) { | ||
onPermissionsUpdated(context, status) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
plural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
well done
…ithout-changes-to-sdk
Right now we have clobbered the example app to make a demo utilizing the new location permissions manager. We will revert that change.