Skip to content

Commit 27e94ce

Browse files
enedclaude
andcommitted
feat: Add LICENSE and README files for all published packages
- Update all LICENSE files to include Flutter Community copyright - Create comprehensive README files for each federated package following best practices - workmanager_platform_interface: Explains the platform interface pattern - workmanager_android: Details Android-specific features and limitations - workmanager_ios: Explains iOS background execution constraints and setup - All READMEs include proper pub.dev badges, usage instructions, and links This follows federated plugin best practices for package documentation and ensures proper licensing attribution for pub.dev publication. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 1f3d7e5 commit 27e94ce

File tree

7 files changed

+207
-0
lines changed

7 files changed

+207
-0
lines changed

workmanager/LICENSE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

33
Copyright (c) 2019 vrtdev
4+
Copyright (c) 2023 Flutter Community
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

workmanager_android/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2019 vrtdev
4+
Copyright (c) 2023 Flutter Community
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

workmanager_android/README.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# workmanager_android
2+
3+
[![pub package](https://img.shields.io/pub/v/workmanager_android.svg)](https://pub.dartlang.org/packages/workmanager_android)
4+
5+
The Android implementation of [`workmanager`][workmanager].
6+
7+
## Usage
8+
9+
This package is [endorsed][federated_plugin_docs], which means you can simply use `workmanager`
10+
normally. This package will be automatically included in your app when you do,
11+
so you do not need to add it to your `pubspec.yaml`.
12+
13+
However, if you `import` this plugin directly (instead of the generic `workmanager` plugin),
14+
you should add it to your `pubspec.yaml`:
15+
16+
```yaml
17+
dependencies:
18+
workmanager_android: ^0.8.0
19+
```
20+
21+
## Android setup
22+
23+
Add the following to your `android/app/src/main/AndroidManifest.xml`:
24+
25+
```xml
26+
<!-- Background processing permissions -->
27+
<uses-permission android:name="android.permission.WAKE_LOCK" />
28+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
29+
```
30+
31+
For more detailed setup instructions, see the [Android setup documentation][android_setup].
32+
33+
## Features
34+
35+
This Android implementation supports:
36+
37+
- **One-off tasks**: Execute background tasks once after a delay
38+
- **Periodic tasks**: Execute background tasks repeatedly at specified intervals
39+
- **Task constraints**: Network, charging, battery, storage, and device idle requirements
40+
- **Task cancellation**: Cancel individual tasks or all tasks
41+
- **Work policies**: Configure what happens when tasks with the same unique name are registered
42+
- **Backoff policies**: Configure retry behavior for failed tasks
43+
- **Task scheduling info**: Check if periodic tasks are currently scheduled
44+
45+
## Limitations
46+
47+
- Processing tasks are not supported on Android (use one-off tasks instead)
48+
- Tag-based operations work with individual tasks
49+
- iOS-specific features like `printScheduledTasks` are not available
50+
51+
[workmanager]: https://pub.dartlang.org/packages/workmanager
52+
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins
53+
[android_setup]: https://github.com/fluttercommunity/flutter_workmanager/blob/main/ANDROID_SETUP.md

workmanager_ios/LICENSE

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2019 vrtdev
4+
Copyright (c) 2023 Flutter Community
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.

workmanager_ios/README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# workmanager_ios
2+
3+
[![pub package](https://img.shields.io/pub/v/workmanager_ios.svg)](https://pub.dartlang.org/packages/workmanager_ios)
4+
5+
The iOS implementation of [`workmanager`][workmanager].
6+
7+
## Usage
8+
9+
This package is [endorsed][federated_plugin_docs], which means you can simply use `workmanager`
10+
normally. This package will be automatically included in your app when you do,
11+
so you do not need to add it to your `pubspec.yaml`.
12+
13+
However, if you `import` this plugin directly (instead of the generic `workmanager` plugin),
14+
you should add it to your `pubspec.yaml`:
15+
16+
```yaml
17+
dependencies:
18+
workmanager_ios: ^0.8.0
19+
```
20+
21+
## iOS setup
22+
23+
For iOS background processing, you need to configure your app properly.
24+
For detailed setup instructions, see the [iOS setup documentation][ios_setup].
25+
26+
## Features
27+
28+
This iOS implementation supports:
29+
30+
- **One-off tasks**: Execute background tasks once using BGTaskScheduler (iOS 13+)
31+
- **Periodic tasks**: Execute background tasks using BGAppRefreshTask (iOS 13+) or Background Fetch
32+
- **Processing tasks**: Execute long-running background tasks using BGProcessingTask (iOS 13+)
33+
- **Task cancellation**: Cancel individual tasks or all tasks
34+
- **Task constraints**: Network and charging requirements (iOS 13+)
35+
- **Task scheduling info**: Print information about scheduled tasks (iOS 13+)
36+
37+
## Limitations
38+
39+
- **iOS 13+ required**: BGTaskScheduler features require iOS 13 or later
40+
- **Tags not supported**: `cancelByTag` operations are not available on iOS
41+
- **No scheduling status**: `isScheduledByUniqueName` is not supported on iOS
42+
- **Background execution limits**: iOS strictly limits background execution time and frequency
43+
- **System scheduling**: iOS determines when tasks actually run based on user behavior and system resources
44+
45+
## Background execution on iOS
46+
47+
Please note that iOS has strict limitations on background execution:
48+
49+
- Background tasks are scheduled by the system and may not run immediately
50+
- The system considers user behavior patterns when scheduling background work
51+
- Tasks may be throttled or denied if the app is used infrequently
52+
- Background App Refresh must be enabled by the user for your app
53+
54+
For more information, see Apple's [Background Tasks documentation][apple_background_tasks].
55+
56+
[workmanager]: https://pub.dartlang.org/packages/workmanager
57+
[federated_plugin_docs]: https://flutter.dev/go/federated-plugins
58+
[ios_setup]: https://github.com/fluttercommunity/flutter_workmanager/blob/main/IOS_SETUP.md
59+
[apple_background_tasks]: https://developer.apple.com/documentation/backgroundtasks
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
MIT License
2+
3+
Copyright (c) 2019 vrtdev
4+
Copyright (c) 2023 Flutter Community
5+
6+
Permission is hereby granted, free of charge, to any person obtaining a copy
7+
of this software and associated documentation files (the "Software"), to deal
8+
in the Software without restriction, including without limitation the rights
9+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10+
copies of the Software, and to permit persons to whom the Software is
11+
furnished to do so, subject to the following conditions:
12+
13+
The above copyright notice and this permission notice shall be included in all
14+
copies or substantial portions of the Software.
15+
16+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22+
SOFTWARE.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# workmanager_platform_interface
2+
3+
[![pub package](https://img.shields.io/pub/v/workmanager_platform_interface.svg)](https://pub.dartlang.org/packages/workmanager_platform_interface)
4+
5+
A common platform interface for the [`workmanager`][workmanager] plugin.
6+
7+
This interface allows platform-specific implementations of the `workmanager`
8+
plugin, as well as the plugin itself, to ensure they are supporting the
9+
same interface.
10+
11+
## Usage
12+
13+
To implement a new platform-specific implementation of `workmanager`, extend
14+
[`WorkmanagerPlatform`][platform_interface] with an implementation that performs the
15+
platform-specific behavior, and when you register your plugin, set the default
16+
`WorkmanagerPlatform` by calling
17+
`WorkmanagerPlatform.instance = MyWorkmanagerPlatform()`.
18+
19+
## Note on breaking changes
20+
21+
Strongly prefer non-breaking changes (such as adding a method to the interface)
22+
over breaking changes for this package.
23+
24+
See https://flutter.dev/go/platform-interface-breaking-changes for a discussion
25+
on why a less-clean interface is preferable to a breaking change.
26+
27+
[workmanager]: https://pub.dartlang.org/packages/workmanager
28+
[platform_interface]: lib/src/workmanager_platform_interface.dart

0 commit comments

Comments
 (0)