Skip to content

Commit

Permalink
Use the new SDK with static API (#38)
Browse files Browse the repository at this point in the history
Update SDK iOS to 5.0.2
Update SDK Android to 7.0.3
Add .editorconfig
  • Loading branch information
pavel-kuznetsov-hypertrack committed Oct 2, 2023
1 parent a39ea75 commit 05962d0
Show file tree
Hide file tree
Showing 139 changed files with 5,250 additions and 2,036 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
@@ -0,0 +1,3 @@
[android/src/main/kotlin/com/hypertrack/sdk/flutter/**/*.kt]
ktlint_standard_enum-entry-name-case = disabled
ktlint_standard_no-wildcard-imports = disabled
5 changes: 4 additions & 1 deletion .justfile
@@ -1,10 +1,13 @@
alias r := release
alias d := docs

lint:
ktlint --format .

release: docs
flutter pub publish --dry-run

docs:
docs: lint
dart doc
cp -R doc/api/ docs
rm -r doc
132 changes: 127 additions & 5 deletions CHANGELOG.md
Expand Up @@ -3,6 +3,57 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.0] - 2023-10-02

### Added

- `locate()` to ask for one-time user location
- `locationSubcription` to subscribe to user location updates
- `errors` getter
- `name` getter
- `metadata` getter
- HyperTrackError types:
- `noExemptionFromBackgroundStartRestrictions`
- `permissionsNotificationsDenied`

### Changed

- Updated HyperTrack Android SDK
to [7.0.3](https://github.com/hypertrack/sdk-android/blob/master/CHANGELOG.md#703---2023-09-28)
- Add Android SDK plugins (`location-services-google` and `push-service-firebase`)
- Updated HyperTrack iOS SDK to [5.0.2](https://github.com/hypertrack/sdk-ios/releases/tag/5.0.2)
- The whole HyperTrack API is now static
- Changed the way to provide publishableKey (
- You need to add `HyperTrackPublishableKey` `meta-data` item to your `AndroidManifest.xml` and
the same entry to `Info.plist`)
- Renamed HyperTrackError types:
- `gpsSignalLost` to `locationSignalLost`
- `locationPermissionsDenied` to `permissionsLocationDenied`
- `locationPermissionsInsufficientForBackground`
to `permissionsLocationInsufficientForBackground`
- `locationPermissionsNotDetermined` to `permissionsLocationNotDetermined`
- `locationPermissionsProvisional` to `locationPermissionsProvisional`
- `locationPermissionsReducedAccuracy` to `permissionsLocationReducedAccuracy`
- `locationPermissionsRestricted` to `permissionsLocationRestricted`
- Renamed `setAvailability()` to `setIsAvailable(boolean)`
- Changed `startTracking()` and `stopTracking()` to `setIsTracking(boolean)`
- Renamed `onTrackingChanged` to `isTrackingSubscription`
- Renamed `onAvailabilityChanged` to `isAvailableSubscription`
- Renamed `onError` to `errorsSubscription`
- Renamed `JSONValue` to `JSON`

### Removed

- `initialize()` method (the API is now static)
- Motion Activity permissions are not required for tracking anymore
- HyperTrackError types:
- `motionActivityPermissionsDenied`
- `motionActivityServicesDisabled`
- `motionActivityServicesUnavailable`
- `motionActivityPermissionsRestricted`
- `networkConnectionUnavailable`
- `sync()` method

## [1.1.3] - 2023-06-16

### Changed
Expand All @@ -12,30 +63,36 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [1.1.2] - 2023-06-14

### Changed

- Updated HyperTrack Android SDK to 6.4.2
- Updated Kotlin to 1.6.21

## [1.1.1] - 2023-06-01

### Changed

- Updated HyperTrack iOS SDK to 4.16.0

## [1.1.0] - 2023-05-18

### Added

- `addGeotag` with expected location
- `automaticallyRequestPermissions` param to SDK initialization
- JSONNull type to JSONValue

### Changed

- Updated HyperTrack iOS SDK to 4.15.0

### Fixed

- String representation of errors in subscribeToErrors result

## [1.0.0] - 2023-02-17

### Changed

- Updated HyperTrack iOS SDK to 4.14.0
- Updated HyperTrack Android SDK to 6.4.0
- `syncDeviceSettings()` renamed to `sync()`
Expand All @@ -45,123 +102,188 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `stop()` renamed to `stopTracking()`

### Added

- `initialize()` configuration params for
- Debug logging
- Background location permissions request for Android
- Mock locations
- Debug logging
- Background location permissions request for Android
- Mock locations
- `onAvailabilityChanged` stream
- `onError` stream
- Location result for `addGeotag`

### Removed

- `getLatestLocation()`
- `allowMockLocations()` (use `initialize()` param `allowMockLocations` instead)
- `enableDebugLogging()` (use `initialize()` param `loggingEnabled` instead)
- `getRunnigStatus()`
- 'expectedLocation' param from 'addGeotag()'

## [0.4.3] - 2022-09-16

#### Changed

- Android SDK updated to 6.3.0

## [0.4.2] - 2022-08-30

#### Changed

- Android SDK updated to 6.2.2

## [0.4.1] - 2022-07-19

#### Changed

- Android SDK updated to 6.2.0
- iOS SDK updated to 4.12.3

## [0.4.0] - 2022-07-07

#### Changed

- Android SDK updated to 6.1.4

## [0.3.1] - 2022-07-05

#### Fixed

- Android null type safety plugin fixes

## [0.3.0] - 2021-11-17

#### Changed

- Android SDK updated to 5.4.5

## [0.2.1] - 2021-07-07

#### Changed

- No code changes. Package metadata was updated to improve scoring.

## [0.2.0] - 2021-07-07

#### Added

- Dart nullability support added to comply with Flutter 2 requirements

#### Changed

- Android SDK updated to 5.2.5

## [0.1.9] - 2021-05-07

#### Changed

- Android SDK updated to 4.12.0

## [0.1.8] - 2021-04-07

#### Changed

- Android SDK updated to 4.11.0

## [0.1.7] - 2020-12-24

#### Changed

- Android SDK updated to 4.9.0
- Firebase conflicts were fixed.

## [0.1.6] - 2020-12-23

#### Fixed

- iOS plugin runtime error notification.

#### Changed
- iOS SDK version updated to 4.7.0

- iOS SDK version updated to 4.7.0

## [0.1.5] - 2020-12-16

#### Fixed

- iOS plugin, incorrect `permissions_error` notification.

## [0.1.4] - 2020-11-20

#### Fixed

- Firebase tokens and messages forwarding.

#### Changed

- iOS SDK version updated to 4.6.0

## [0.1.3] - 2020-11-02

#### Changed

- Android SDK version updated to 4.8.0

## [0.1.2] - 2020-09-28

#### Changed

- Android SDK version updated to 4.6.0

## [0.1.1] - 2020-06-18

#### Changed

- Android SDK version updated to 4.4.1
- setTripMarker` replaced with `addGeotag`
- setTripMarker` replaced with `addGeotag`

## [0.1.0] - 2020-03-24

#### Added

- Initial release.

[1.1.3]: https://github.com/hypertrack/sdk-flutter/releases/tag/1.1.3

[1.1.2]: https://github.com/hypertrack/sdk-flutter/releases/tag/1.1.2

[1.1.1]: https://github.com/hypertrack/sdk-flutter/releases/tag/1.1.1

[1.1.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/1.1.0

[1.0.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/1.0.0

[0.4.3]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.4.3

[0.4.2]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.4.2

[0.4.1]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.4.1

[0.4.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.4.0

[0.3.1]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.3.1

[0.3.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.3.0

[0.2.1]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.2.1

[0.2.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.2.0

[0.1.9]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.9

[0.1.8]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.8

[0.1.7]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.7

[0.1.6]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.6

[0.1.5]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.5

[0.1.4]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.4

[0.1.3]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.3

[0.1.2]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.2

[0.1.1]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.1

[0.1.0]: https://github.com/hypertrack/sdk-flutter/releases/tag/0.1.0
32 changes: 16 additions & 16 deletions CONTRIBUTING.md
Expand Up @@ -11,7 +11,7 @@
- implementation 'com.hypertrack:hypertrack:**version**
- ios
- [ios/hypertrack_plugin.podspec](ios/hypertrack_plugin.podspec)
- s.dependency 'HyperTrack/Objective-C', '**version**'
- s.dependency 'HyperTrack', '**version**'

2. Increment wrapper version
- [pubspec.yaml](pubspec.yaml)
Expand All @@ -20,34 +20,34 @@

3. Update [CHANGELOG](CHANGELOG.md)

- **Add the release link to the bottom**
- **Add the release link to the bottom**

4. Update badge in [README](README.md)

5. Run `just release` to do a release dry-run and is everything OK

6. Merge changes and create a version tag

7. Create a release
- Release title - version

8. Publish Flutter package with `flutter pub publish`

### How to change build config

#### Android

- compileSdkVersion
- android/build.gradle
- `android {}`
- compileSdkVersion
- android/build.gradle
- `android {}`
- compileSdkVersion

- minSdkVersion
- android/build.gradle
- `defaultConfig {}`
- minSdkVersion
- android/build.gradle
- `defaultConfig {}`
- minSdkVersion

- platform version (flutter)
- pubspec.yaml
- environment:
- sdk:
- pubspec.yaml
- environment:
- sdk:
15 changes: 9 additions & 6 deletions README.md
@@ -1,16 +1,19 @@

# Flutter HyperTrack SDK

[![GitHub](https://img.shields.io/github/license/hypertrack/sdk-flutter?color=orange)](./LICENSE)
[![Pub Version](https://img.shields.io/pub/v/hypertrack_plugin?color=blueviolet)](https://pub.dev/packages/hypertrack_plugin)
[![iOS SDK](https://img.shields.io/badge/iOS%20SDK-4.16.1-brightgreen.svg)](https://github.com/hypertrack/sdk-ios)
[![Android SDK](https://img.shields.io/badge/Android%20SDK-6.4.2-brightgreen.svg)](https://github.com/hypertrack/sdk-android)
[![iOS SDK](https://img.shields.io/badge/iOS%20SDK-5.0.2-brightgreen.svg)](https://github.com/hypertrack/sdk-ios)
[![Android SDK](https://img.shields.io/badge/Android%20SDK-7.0.3-brightgreen.svg)](https://github.com/hypertrack/sdk-android)

[HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app. Live location is made available along with ongoing activity, tracking controls and tracking outage with reasons.
[HyperTrack](https://www.hypertrack.com) lets you add live location tracking to your mobile app.
Live location is made available along with ongoing activity, tracking controls and tracking outage
with reasons.

Flutter HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate HyperTrack into Flutter apps.
Flutter HyperTrack SDK is a wrapper around native iOS and Android SDKs that allows to integrate
HyperTrack into Flutter apps.

For information about how to get started with Flutter HyperTrack SDK check this [Guide](https://hypertrack.com/docs/install-sdk-flutter).
For information about how to get started with Flutter HyperTrack SDK check
this [Guide](https://hypertrack.com/docs/install-sdk-flutter).

## Installation

Expand Down

0 comments on commit 05962d0

Please sign in to comment.