Skip to content

3.13.0

Compare
Choose a tag to compare
@nickpatrick nickpatrick released this 03 Jun 11:03
· 8 commits to master since this release
77fc7b3
  • Updates Radar.trackVerified() and RadarVerifiedReceiver.didUpdateToken() to return token: RadarVerifiedLocationToken, which includes user, events, token, expiresAt, expiresIn, and passed. Use token.passed to allow or deny access to app features, and optionally send token.token (a signed JWT) to your server to validate the signature.
  • Removes Radar.trackVerifiedToken(), since Radar.trackVerified() now returns a signed JWT.
  • Instead of calling Radar.trackVerified(), which always fetches a fresh location token, you can instead call Radar.getVerifiedLocationToken(), which returns a cached location token immediately if the last location token is still valid, or fetches a fresh location token if not.
  • You can also call Radar.startTrackingVerified() to fetch and cache location tokens in the background automatically on connection changes, on the specified interval, or more frequently if token.expiresIn < interval (based on current state, distance to border, and so on). If you set a receiver with Radar.setVerifiedReceiver(), location tokens are also delivered to RadarVerifiedReceiver.onTokenUpdated().