Skip to content

Commit

Permalink
Merge pull request #27 from a-mabe/v1.0.2
Browse files Browse the repository at this point in the history
v1.0.2
  • Loading branch information
a-mabe authored Dec 12, 2024
2 parents 1a5db27 + 1c1f983 commit 6cf47ae
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.2] - 2024-12-11

### Changed

- Fixed blank sound not playing to keep background process alive.
- Example app background process will now stop on app close for Android.

## [1.0.1] - 2024-12-07

### Changed
Expand Down
8 changes: 5 additions & 3 deletions example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.SCHEDULE_EXACT_ALARM" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" />
Expand All @@ -8,8 +8,10 @@
android:icon="@mipmap/ic_launcher">
<service
android:name="id.flutter.flutter_background_service.BackgroundService"
android:foregroundServiceType="mediaPlayback">
</service>
android:exported="true"
android:foregroundServiceType="mediaPlayback"
tools:replace="android:stopWithTask"
android:stopWithTask="true"/>
<activity
android:name=".MainActivity"
android:exported="true"
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle/wrapper/gradle-wrapper.properties
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-7.5-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-all.zip
2 changes: 1 addition & 1 deletion example/android/settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pluginManagement {

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.4.2" apply false
id "com.android.application" version "8.1.0" apply false
id "org.jetbrains.kotlin.android" version "1.8.10" apply false
}

Expand Down
4 changes: 2 additions & 2 deletions lib/background_timer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ class CountdownState extends State<Countdown> with WidgetsBindingObserver {
intervalIndex < intervals.length - 1) {
logger.d("Advancing to next interval");
timerState.advanceToNextInterval(intervals);
} else if (timerState.currentMicroSeconds % 2000000 == 0) {
await playSound(blankSoundId, pool, preferences);
}
} else if (timerState.currentMicroSeconds % 1000000 == 0) {
await playSound(blankSoundId, pool, preferences);
}

service.invoke('update', timerState.toMap());
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: background_hiit_timer
description: Flutter background timer package developed for HIIT timers.
version: 1.0.1
version: 1.0.2
repository: https://github.com/a-mabe/background_hiit_timer

funding:
Expand Down

0 comments on commit 6cf47ae

Please sign in to comment.