Skip to content

Commit 904f031

Browse files
committed
fixed merge
2 parents ae4c93a + e0316f0 commit 904f031

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+713
-348
lines changed

.fvmrc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"flutter": "3.27.3"
3+
}

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,4 +91,6 @@ test/coverage_helper_test.dart
9191
**_testImage.png
9292

9393
# Fvm
94-
.fvm/flutter_sdk
94+
95+
# FVM Version Cache
96+
.fvm/

.vscode/launch.json

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "flutter-background-location-tracker",
9+
"request": "launch",
10+
"type": "dart"
11+
},
12+
{
13+
"name": "example",
14+
"cwd": "example",
15+
"request": "launch",
16+
"type": "dart"
17+
},
18+
{
19+
"name": "example (release mode)",
20+
"cwd": "example",
21+
"request": "launch",
22+
"type": "dart",
23+
"flutterMode": "release"
24+
}
25+
]
26+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dart.flutterSdkPath": ".fvm/versions/3.27.3"
3+
}

CHANGELOG.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1+
## 1.5.0 - 2025-01-29
2+
- Updated gradle dependencies
3+
14
## 1.4.4 - 26-11-2024
25
- Fix: Cannot Access 'lifecycle'
36

47
## 1.4.3 - 28-03-2024
58
- Updated targetSdkVersion to 34 and added FOREGROUND_SERVICE_LOCATION for support Android 14
69
- Removed unrecognized_error_code from analysis_options.yaml
710

8-
## 1.4.2 - 11-09-2023
11+
## 1.4.2 - 2023-09-11
912
- Added fromJson/toJson/toString/equals/copyWith methods in BackgroundLocationUpdateData
1013

11-
## 1.4.1 - 17-06-2023
14+
## 1.4.1 - 2023-06-17
1215
- Updates Play Services Location library
1316

14-
## 1.4.0 - 11-01-2023
17+
## 1.4.0 - 2023-01-11
1518
- Added extra fields. (-1 if not supported or not available)
1619
- horizontalAccuracy
1720
- alt
@@ -21,35 +24,35 @@
2124
- speed
2225
- speedAccuracy (Android > O)
2326

24-
## 1.3.1 - 14-12-2022
27+
## 1.3.1 - 2022-12-14
2528
- Fix crash with starting service in background
2629

27-
## 1.3.0 - 12-09-2022
30+
## 1.3.0 - 2022-09-12
2831
- Added support for android sdk 33
2932
- Updated dependencies
3033
- Updated kotlin
3134
- Fixed the breaking changes on the native android side
3235
- Updated the example project to save the background locations to shared prefs
3336
- Updated the example project & readme to use the `@pragma('vm:entry-point')` annotation
3437

35-
## 1.2.0 - 15-11-2021
38+
## 1.2.0 - 2021-11-15
3639
- Added iOS specific options to restart the tracking after killing the app
3740
- Added option to Android specific options to only get updates every x meters
3841

39-
## 1.1.0 - 14-10-2021
42+
## 1.1.0 - 2021-10-14
4043
#Added
4144
- Added more options to android config to specify update interval
4245
- Added iOS specific options to control activity type and/or distance filter
4346

44-
## 1.0.2 - 22-06-2021
47+
## 1.0.2 - 2021-06-22
4548
#Fixed
4649
- Formatting
4750

48-
## 1.0.1 - 22-06-2021
51+
## 1.0.1 - 2021-06-22
4952
#Added
5053
- Pub.dev badge
5154

52-
## 1.0.0 - 22-06-2021
55+
## 1.0.0 - 2021-06-22
5356
Initial release
5457
- Background location tracking
5558
- Nullsafety

analysis_options.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ linter:
5656
- file_names
5757
- hash_and_equals
5858
- implementation_imports
59-
- invariant_booleans
6059
- collection_methods_unrelated_type
6160
- join_return_with_assignment
6261
- library_names
@@ -70,7 +69,6 @@ linter:
7069
- one_member_abstracts
7170
- only_throw_errors
7271
- overridden_fields
73-
- package_api_docs
7472
- package_names
7573
- package_prefixed_library_names
7674
- parameter_assignments
@@ -83,7 +81,6 @@ linter:
8381
- prefer_const_literals_to_create_immutables
8482
- prefer_constructors_over_static_methods
8583
- prefer_contains
86-
- prefer_equal_for_default_values
8784
- prefer_final_fields
8885
- prefer_final_in_for_each
8986
- prefer_final_locals

android/build.gradle

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'com.android.tools.build:gradle:7.3.1'
12+
classpath 'com.android.tools.build:gradle:8.3.2'
1313
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
1414
}
1515
}
@@ -27,11 +27,22 @@ apply plugin: 'kotlin-android'
2727
android {
2828
compileSdkVersion 34
2929

30+
namespace 'com.icapps.background_location_tracker'
31+
32+
compileOptions {
33+
sourceCompatibility = JavaVersion.VERSION_17
34+
targetCompatibility = JavaVersion.VERSION_17
35+
}
36+
37+
kotlinOptions {
38+
jvmTarget = JavaVersion.VERSION_17
39+
}
40+
3041
sourceSets {
3142
main.java.srcDirs += 'src/main/kotlin'
3243
}
3344
defaultConfig {
34-
minSdkVersion 16
45+
minSdkVersion 19
3546
targetSdkVersion 34
3647
}
3748
lintOptions {

android/gradle/wrapper/gradle-wrapper.properties

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
36
zipStoreBase=GRADLE_USER_HOME
47
zipStorePath=wrapper/dists
5-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip

android/src/main/AndroidManifest.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
66
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />
77
<uses-permission android:name="android.permission.WAKE_LOCK" />
8+
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
89
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
910

1011
<application>

android/src/main/kotlin/com/icapps/background_location_tracker/utils/NotificationUtil.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ internal object NotificationUtil {
5959
val clickPendingIntent = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
6060
PendingIntent.getActivity(context, 0, context.packageManager.getLaunchIntentForPackage(context.packageName), PendingIntent.FLAG_IMMUTABLE)
6161
} else {
62+
@Suppress("UnspecifiedImmutableFlag")
6263
PendingIntent.getActivity(context, 0, context.packageManager.getLaunchIntentForPackage(context.packageName), 0)
6364
}
6465

0 commit comments

Comments
 (0)