Skip to content
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

[Foreground Service] Release of 4.0.0 (upgraded AGP, Kotlin) #772

Merged
merged 1 commit into from
Jul 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ These are the available plugins in this repository.
| [audio_streamer](./packages/audio_streamer) | Stream audio as PCM from mic| ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/audio_streamer.svg)](https://pub.dartlang.org/packages/audio_streamer) |
| [mobility_features](./packages/mobility_features) | Compute daily mobility features from location data | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/mobility_features.svg)](https://pub.dartlang.org/packages/mobility_features) |
| [carp_background_location](./packages/carp_background_location) | Track location, even when app is in the background | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/carp_background_location.svg)](https://pub.dartlang.org/packages/carp_background_location) |
| [flutter_foreground_service](./packages/flutter_foreground_service) | Foreground service for Android | ✔️ | ✔️ | [![pub package](https://img.shields.io/pub/v/flutter_foreground_service.svg)](https://pub.dartlang.org/packages/flutter_foreground_service) |
| [flutter_foreground_service](./packages/flutter_foreground_service) | Foreground service for Android | ✔️ | | [![pub package](https://img.shields.io/pub/v/flutter_foreground_service.svg)](https://pub.dartlang.org/packages/flutter_foreground_service) |

## Issues

Expand Down
31 changes: 21 additions & 10 deletions packages/flutter_foreground_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,31 @@
## 0.4.0

- Upgraded Kotlin and AGP
- Upgraded sdk version for Android

## 0.3.0
* Support for null-safety.

- Support for null-safety.

## 0.2.1
* Rebuild project from scratch due to iOS issues with old generated code.

- Rebuild project from scratch due to iOS issues with old generated code.

## 0.2.0
* No longer produces an exception when invoked on iOS.


- No longer produces an exception when invoked on iOS.

## 0.1.1
* Fixed expected launcher icon path
* Previously `drawable` was the expected folder
* Now the `mipmap` folder is expected

- Fixed expected launcher icon path
- Previously `drawable` was the expected folder
- Now the `mipmap` folder is expected

## 0.1.0+1
* Updated documentation

- Updated documentation

## 0.1.0
* Forked from https://pub.dev/packages/foreground_service
* Changed hardcoded notification icon name to 'ic_launcher.png'

- Forked from https://pub.dev/packages/foreground_service
- Changed hardcoded notification icon name to 'ic_launcher.png'
12 changes: 6 additions & 6 deletions packages/flutter_foreground_service/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,36 @@ group 'dk.cachet.flutter_foreground_service'
version '1.0-SNAPSHOT'

buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

rootProject.allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'

android {
compileSdkVersion 29
compileSdkVersion 30

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
defaultConfig {
minSdkVersion 16
minSdkVersion 30
}
lintOptions {
disable 'InvalidPackage'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\\://services.gradle.org/distributions/gradle-7.5-all.zip
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ class FlutterForegroundServicePlugin: FlutterPlugin, MethodCallHandler, IntentSe
class NotificationHelper(val notificationId: Int = 1){

//things that MUST be set for a notification to function property (probably)

//setContentTitle
//setContentText
//setSmallIcon
Expand Down Expand Up @@ -774,4 +774,4 @@ enum class AndroidNotifiationPriority{
}
)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
compileSdkVersion 29
compileSdkVersion 33


sourceSets {
main.java.srcDirs += 'src/main/kotlin'
Expand All @@ -39,8 +40,8 @@ android {
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "dk.cachet.flutter_foreground_service_example"
minSdkVersion 16
targetSdkVersion 29
minSdkVersion 30
targetSdkVersion 33
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
additional functionality it is fine to subclass or reimplement
FlutterApplication and put your custom class here. -->
<application
android:name="io.flutter.app.FlutterApplication"
android:name="${applicationName}"
android:label="flutter_foreground_service_example"
android:icon="@mipmap/ic_launcher">
<activity
Expand All @@ -15,7 +15,8 @@
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
android:windowSoftInputMode="adjustResize"
android:exported="true">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
Expand Down
10 changes: 5 additions & 5 deletions packages/flutter_foreground_service/example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
buildscript {
ext.kotlin_version = '1.3.50'
ext.kotlin_version = '1.7.10'
repositories {
google()
jcenter()
mavenCentral()
}

dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath 'com.android.tools.build:gradle:7.3.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

allprojects {
repositories {
google()
jcenter()
mavenCentral()
}
}

Expand All @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-all.zip
5 changes: 2 additions & 3 deletions packages/flutter_foreground_service/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description: Demonstrates how to use the flutter_foreground_service plugin.

# The following line prevents the package from being accidentally published to
# pub.dev using `pub publish`. This is preferred for private packages.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev

environment:
sdk: ">=2.7.0 <3.0.0"
sdk: ">=2.17.0 <4.0.0"

dependencies:
flutter:
Expand All @@ -28,7 +28,6 @@ dev_dependencies:

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
Expand Down
11 changes: 4 additions & 7 deletions packages/flutter_foreground_service/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: flutter_foreground_service
description: Foreground service for the Android platform
version: 0.3.0
description: Foreground service for the Android platform, keeps app running even when in background.
version: 0.4.0
homepage: https://github.com/cph-cachet/flutter-plugins

environment:
sdk: '>=2.12.0 <3.0.0'
flutter: ">=2.2.0"
sdk: ">=2.17.0 <4.0.0"
flutter: ">=3.0.0"

dependencies:
flutter:
Expand All @@ -15,7 +15,6 @@ dev_dependencies:
# flutter_test:
# sdk: flutter


flutter:
# This section identifies this Flutter project as a plugin project.
# The 'pluginClass' and Android 'package' identifiers should not ordinarily
Expand All @@ -26,5 +25,3 @@ flutter:
android:
package: dk.cachet.flutter_foreground_service
pluginClass: FlutterForegroundServicePlugin
ios:
pluginClass: FlutterForegroundServicePlugin