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

example/.gitignore

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,12 @@
55
*.swp
66
.DS_Store
77
.atom/
8+
.build/
89
.buildlog/
910
.history
1011
.svn/
12+
.swiftpm/
13+
migrate_working_dir/
1114

1215
# IntelliJ related
1316
*.iml
@@ -26,16 +29,17 @@
2629
.dart_tool/
2730
.flutter-plugins
2831
.flutter-plugins-dependencies
29-
.packages
3032
.pub-cache/
3133
.pub/
3234
/build/
3335

34-
# Web related
35-
lib/generated_plugin_registrant.dart
36-
3736
# Symbolication related
3837
app.*.symbols
3938

4039
# Obfuscation related
4140
app.*.map.json
41+
42+
# Android Studio will place build artifacts here
43+
/android/app/debug
44+
/android/app/profile
45+
/android/app/release

example/.metadata

Lines changed: 37 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,42 @@
44
# This file should be version controlled and should not be manually edited.
55

66
version:
7-
revision: 1aafb3a8b9b0c36241c5f5b34ee914770f015818
8-
channel: stable
7+
revision: "17025dd88227cd9532c33fa78f5250d548d87e9a"
8+
channel: "stable"
99

1010
project_type: app
11+
12+
# Tracks metadata for the flutter migrate command
13+
migration:
14+
platforms:
15+
- platform: root
16+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
17+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
18+
- platform: android
19+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
20+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
21+
- platform: ios
22+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
23+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
24+
- platform: linux
25+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
26+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
27+
- platform: macos
28+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
29+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
30+
- platform: web
31+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
32+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
33+
- platform: windows
34+
create_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
35+
base_revision: 17025dd88227cd9532c33fa78f5250d548d87e9a
36+
37+
# User provided section
38+
39+
# List of Local paths (relative to this file) that should be
40+
# ignored by the migrate tool.
41+
#
42+
# Files that are not part of the templates will be ignored by default.
43+
unmanaged_files:
44+
- 'lib/main.dart'
45+
- 'ios/Runner.xcodeproj/project.pbxproj'

example/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
# background_location_tracker_example
1+
# example
22

3-
Demonstrates how to use the background_location_tracker plugin.
3+
A new Flutter project.
44

55
## Getting Started
66

77
This project is a starting point for a Flutter application.
88

99
A few resources to get you started if this is your first Flutter project:
1010

11-
- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12-
- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
11+
- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
12+
- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
1313

14-
For help getting started with Flutter, view our
15-
[online documentation](https://flutter.dev/docs), which offers tutorials,
14+
For help getting started with Flutter development, view the
15+
[online documentation](https://docs.flutter.dev/), which offers tutorials,
1616
samples, guidance on mobile development, and a full API reference.

example/analysis_options.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
include: package:flutter_lints/flutter.yaml
2+
3+
linter:
4+
rules:

example/android/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@ gradle-wrapper.jar
77
GeneratedPluginRegistrant.java
88

99
# Remember to never publicly share your keystore.
10-
# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app
10+
# See https://flutter.dev/to/reference-keystore
1111
key.properties
12+
**/*.keystore
13+
**/*.jks

0 commit comments

Comments
 (0)