Skip to content

Commit

Permalink
Merge branch 'main' into feat/send-service
Browse files Browse the repository at this point in the history
  • Loading branch information
miquelbeltran authored Feb 1, 2025
2 parents d6b37cb + 37f533c commit 28cc5af
Show file tree
Hide file tree
Showing 32 changed files with 153 additions and 90 deletions.
11 changes: 6 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
## Description

*Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change.*
<!-- Replace this paragraph with a description of what this PR is doing. If you're modifying existing behavior, describe the existing behavior, how this PR is changing it, and what motivated the change. -->

## Related Issues

*Replace this paragraph with a list of issues related to this PR from the [issue database](https://github.com/fluttercommunity/plus_plugins/issues). Indicate, which of these issues are resolved or fixed by this PR.*
<!-- Replace this paragraph with a list of issues related to this PR from the [issue database](https://github.com/fluttercommunity/plus_plugins/issues). Indicate, which of these issues are resolved or fixed by this PR.
*e.g.*
- *Fix #123*
- *Related #456*
e.g.
- Fix #<ticket number>
- Related #<ticket number>
-->

## Checklist

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ on:
schedule:
- cron: '0 0 * * *'

permissions:
issues: write
pull-requests: write

jobs:
stale:
runs-on: ubuntu-latest
Expand All @@ -26,3 +30,5 @@ jobs:
exempt-issue-labels: enhancement
exempt-pr-labels: keep-open
operations-per-run: 1000
- name: Lock closed issues and PRs
uses: dessant/lock-threads@v5
19 changes: 14 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ _See also: [Flutter's code of conduct](https://flutter.dev/design-principles/#co
We welcome all contributions to the project, however some contributions will need extra work in
order to be accepted.

> [!IMPORTANT]
> Before submitting a large PR, create a ticket with a proposal and wait for the maintainers to give you feedback.
Here's some examples:

### 🟢 Easily accepted contributions
Expand Down Expand Up @@ -85,6 +88,7 @@ The bootstrap command locally links all dependencies within the project without
provide manual [`dependency_overrides`](https://dart.dev/tools/pub/pubspec). This allows all
plugins, examples and tests to build from the local clone project.

> [!TIP]
> You do not need to run `flutter pub get` once bootstrap has been completed.
## 4. Running an example
Expand Down Expand Up @@ -172,14 +176,15 @@ file.

We gladly accept contributions via GitHub pull requests.

Please peruse the
Please follow the
[Flutter style guide](https://github.com/flutter/flutter/wiki/Style-guide-for-Flutter-repo) and
[design principles](https://flutter.dev/design-principles/) before
working on anything non-trivial. These guidelines are intended to
keep the code consistent and avoid common pitfalls.

**Important:** When modifying multiple packages, **create a different branch and pull request per package.**
This facilitates maintenance, the review process, and generating changelogs.
> [!IMPORTANT]
> When modifying multiple packages, **create a different branch and pull request per package.**
> This facilitates maintenance, the review process, and generating changelogs.
### 5.1 Getting started

Expand All @@ -202,9 +207,10 @@ melos run analyze
melos run format
```

### 5.3 (Do not) Update version and changelog
### 5.3 Do not update version and changelog

**NEW: Do not modify the CHANGELOG.md or the version in the pubspec.yaml, this is handled by the maintainers from now on**
> [!CAUTION]
> Do not modify the `CHANGELOG.md` or the version in the `pubspec.yaml`, this is handled by the maintainers from now on
### 5.4 Commit and push your changes

Expand All @@ -231,6 +237,9 @@ guide, and include the package name in parenthesis. For example, for a fix to th
Please also enable **“Allow edits by maintainers”**, this will help to speed-up the review
process as well.

> [!TIP]
> Ensure the PR description is filled correctly and the markdown looks correctly.
### 5.6 Now be patient :)

Plugins tests are run automatically on contributions using GitHub Actions. Depending on
Expand Down
4 changes: 4 additions & 0 deletions packages/android_alarm_manager_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 4.0.6

- **FIX**(android_alarm_manager_plus): set correct environment versions ([#3420](https://github.com/fluttercommunity/plus_plugins/issues/3420)). ([c2722f83](https://github.com/fluttercommunity/plus_plugins/commit/c2722f8345407d3bf7c66b99e57fbf5c75da428f))

## 4.0.5

- **REFACTOR**(all): Use range of flutter_lints for broader compatibility ([#3371](https://github.com/fluttercommunity/plus_plugins/issues/3371)). ([8a303add](https://github.com/fluttercommunity/plus_plugins/commit/8a303add3dee1acb8bac5838246490ed8a0fe408))
Expand Down
4 changes: 2 additions & 2 deletions packages/android_alarm_manager_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ Dart code in the background when alarms fire.

## Requirements

- Flutter >=3.3.0
- Dart >=2.18.0 <4.0.0
- Flutter >=3.12.0
- Dart >=3.1.0 <4.0.0
- Android `compileSDK` 34
- Java 17
- Android Gradle Plugin >=8.3.0
Expand Down
2 changes: 1 addition & 1 deletion packages/android_alarm_manager_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ environment:
dependencies:
flutter:
sdk: flutter
android_alarm_manager_plus: ^4.0.5
android_alarm_manager_plus: ^4.0.6
permission_handler: ^11.3.0
shared_preferences: ^2.2.2

Expand Down
6 changes: 3 additions & 3 deletions packages/android_alarm_manager_plus/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: android_alarm_manager_plus
description: Flutter plugin for accessing the Android AlarmManager service, and
running Dart code in the background when alarms fire.
version: 4.0.5
version: 4.0.6
homepage: https://github.com/fluttercommunity/plus_plugins
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/android_alarm_manager_plus
issue_tracker: https://github.com/fluttercommunity/plus_plugins/labels/android_alarm_manager_plus
Expand All @@ -11,8 +11,8 @@ topics:
- utils

environment:
sdk: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"
sdk: ">=3.1.0 <4.0.0"
flutter: ">=3.12.0"

dependencies:
flutter:
Expand Down
4 changes: 4 additions & 0 deletions packages/android_intent_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 5.2.2

- **FIX**(android_intent_plus): set correct environment versions ([#3421](https://github.com/fluttercommunity/plus_plugins/issues/3421)). ([dc3ba17a](https://github.com/fluttercommunity/plus_plugins/commit/dc3ba17a3948329de546c373aababb2401e556bb))

## 5.2.1

- **REFACTOR**(all): Use range of flutter_lints for broader compatibility ([#3371](https://github.com/fluttercommunity/plus_plugins/issues/3371)). ([8a303add](https://github.com/fluttercommunity/plus_plugins/commit/8a303add3dee1acb8bac5838246490ed8a0fe408))
Expand Down
4 changes: 2 additions & 2 deletions packages/android_intent_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ This plugin allows Flutter apps to launch arbitrary intents when the platform is

## Requirements

- Flutter >=3.3.0
- Dart >=2.18.0 <4.0.0
- Flutter >=3.12.0
- Dart >=3.1.0 <4.0.0
- Android `compileSDK` 34
- Java 17
- Android Gradle Plugin >=8.3.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,59 +73,64 @@ void stopListening() {
*/
@Override
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
String action = convertAction((String) call.argument("action"));
Integer flags = call.argument("flags");
String category = call.argument("category");
Uri data = call.argument("data") != null ? Uri.parse((String) call.argument("data")) : null;
Bundle arguments = convertArguments((Map<String, ?>) call.argument("arguments"));
Bundle arrayArguments = convertArrayArguments((Map<String, ?>) call.argument("arrayArguments"));
arguments.putAll(arrayArguments);
String packageName = call.argument("package");
ComponentName componentName =
(!TextUtils.isEmpty(packageName)
&& !TextUtils.isEmpty((String) call.argument("componentName")))
? new ComponentName(packageName, (String) call.argument("componentName"))
: null;
String type = call.argument("type");
try {
String action = convertAction((String) call.argument("action"));
Integer flags = call.argument("flags");
String category = call.argument("category");
Uri data = call.argument("data") != null ? Uri.parse((String) call.argument("data")) : null;
Bundle arguments = convertArguments((Map<String, ?>) call.argument("arguments"));
Bundle arrayArguments =
convertArrayArguments((Map<String, ?>) call.argument("arrayArguments"));
arguments.putAll(arrayArguments);
String packageName = call.argument("package");
ComponentName componentName =
(!TextUtils.isEmpty(packageName)
&& !TextUtils.isEmpty((String) call.argument("componentName")))
? new ComponentName(packageName, (String) call.argument("componentName"))
: null;
String type = call.argument("type");

Intent intent =
sender.buildIntent(
action, flags, category, data, arguments, packageName, componentName, type);
Intent intent =
sender.buildIntent(
action, flags, category, data, arguments, packageName, componentName, type);

if ("parseAndLaunch".equalsIgnoreCase(call.method)) {
try {
intent = sender.parse(call.argument("uri"));
sender.send(intent);
result.success(null);
} catch (URISyntaxException e) {
result.error("parse_error", "Failed to parse URI", e.getMessage());
}
} else if ("launch".equalsIgnoreCase(call.method)) {

if (intent != null && !sender.canResolveActivity(intent)) {
Log.i(TAG, "Cannot resolve explicit intent, falling back to implicit");
intent.setPackage(null);
}

if ("parseAndLaunch".equalsIgnoreCase(call.method)) {
try {
intent = sender.parse(call.argument("uri"));
sender.send(intent);
result.success(null);
} catch (URISyntaxException e) {
result.error("parse_error", "Failed to parse URI", e.getMessage());
}
} else if ("launch".equalsIgnoreCase(call.method)) {
} else if ("launchChooser".equalsIgnoreCase(call.method)) {
String title = call.argument("chooserTitle");

if (intent != null && !sender.canResolveActivity(intent)) {
Log.i(TAG, "Cannot resolve explicit intent, falling back to implicit");
intent.setPackage(null);
sender.launchChooser(intent, title);
result.success(null);
} else if ("sendBroadcast".equalsIgnoreCase(call.method)) {
sender.sendBroadcast(intent);
result.success(null);
} else if ("sendService".equalsIgnoreCase(call.method)) {
sender.sendService(intent);
result.success(null);
} else if ("canResolveActivity".equalsIgnoreCase(call.method)) {
result.success(sender.canResolveActivity(intent));
} else if ("getResolvedActivity".equalsIgnoreCase(call.method)) {
result.success(sender.getResolvedActivity(intent));
} else {
result.notImplemented();
}

sender.send(intent);
result.success(null);
} else if ("launchChooser".equalsIgnoreCase(call.method)) {
String title = call.argument("chooserTitle");

sender.launchChooser(intent, title);
result.success(null);
} else if ("sendService".equalsIgnoreCase(call.method)) {
sender.sendService(intent);
result.success(null);
} else if ("sendBroadcast".equalsIgnoreCase(call.method)) {
sender.sendBroadcast(intent);
result.success(null);
} else if ("canResolveActivity".equalsIgnoreCase(call.method)) {
result.success(sender.canResolveActivity(intent));
} else if ("getResolvedActivity".equalsIgnoreCase(call.method)) {
result.success(sender.getResolvedActivity(intent));
} else {
result.notImplemented();
} catch (Throwable e) {
result.error("error", e.getMessage(), null);
}
}

Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent_plus/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ dependencies:
flutter:
sdk: flutter
platform: ^3.1.0
android_intent_plus: ^5.2.1
android_intent_plus: ^5.2.2

dev_dependencies:
flutter_driver:
Expand Down
6 changes: 3 additions & 3 deletions packages/android_intent_plus/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: android_intent_plus
description: Flutter plugin for launching Android Intents. Not supported on iOS.
version: 5.2.1
version: 5.2.2
homepage: https://github.com/fluttercommunity/plus_plugins
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/android_intent_plus
issue_tracker: https://github.com/fluttercommunity/plus_plugins/labels/android_intent_plus
Expand All @@ -10,8 +10,8 @@ topics:
- utils

environment:
sdk: ">=2.18.0 <4.0.0"
flutter: ">=3.3.0"
sdk: ">=3.1.0 <4.0.0"
flutter: ">=3.12.0"

flutter:
plugin:
Expand Down
4 changes: 4 additions & 0 deletions packages/connectivity_plus/connectivity_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 6.1.2

- **DOCS**(connectivity_plus): update package requirements ([#3409](https://github.com/fluttercommunity/plus_plugins/issues/3409)). ([cb8c5ead](https://github.com/fluttercommunity/plus_plugins/commit/cb8c5ead41bf8f1d5042a1109eac3e23305d3016))

## 6.1.1

- **REFACTOR**(all): Use range of flutter_lints for broader compatibility ([#3371](https://github.com/fluttercommunity/plus_plugins/issues/3371)). ([8a303add](https://github.com/fluttercommunity/plus_plugins/commit/8a303add3dee1acb8bac5838246490ed8a0fe408))
Expand Down
4 changes: 2 additions & 2 deletions packages/connectivity_plus/connectivity_plus/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ This plugin allows Flutter apps to discover network connectivity types that can

## Requirements

- Flutter >=3.7.0
- Dart >=3.2.0 <4.0.0
- Flutter >=3.19.0
- Dart >=3.3.0 <4.0.0
- iOS >=12.0
- MacOS >=10.14
- Android `compileSDK` 34
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ environment:
dependencies:
flutter:
sdk: flutter
connectivity_plus: ^6.1.1
connectivity_plus: ^6.1.2

dev_dependencies:
flutter_driver:
Expand Down
2 changes: 1 addition & 1 deletion packages/connectivity_plus/connectivity_plus/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: connectivity_plus
description: Flutter plugin for discovering the state of the network (WiFi & mobile/cellular) connectivity on Android and iOS.
version: 6.1.1
version: 6.1.2
homepage: https://github.com/fluttercommunity/plus_plugins
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/connectivity_plus/connectivity_plus
issue_tracker: https://github.com/fluttercommunity/plus_plugins/labels/connectivity_plus
Expand Down
11 changes: 11 additions & 0 deletions packages/device_info_plus/device_info_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
## 11.2.2

- **FIX**(device_info_plus): Replace throwing exception with returning default values on Windows ([#3445](https://github.com/fluttercommunity/plus_plugins/issues/3445)). ([084730f8](https://github.com/fluttercommunity/plus_plugins/commit/084730f82436b474b31b16f6dc2d7b90585e899f))
- **DOCS**(device_info_plus): Update the documentation URL for property descriptions. ([#3441](https://github.com/fluttercommunity/plus_plugins/issues/3441)). ([743bec62](https://github.com/fluttercommunity/plus_plugins/commit/743bec626c909fdc8ba6d087006568cca60563d8))

## 11.2.1

- **FIX**(device_info_plus): Resolve compilation issues with SPM enabled ([#3405](https://github.com/fluttercommunity/plus_plugins/issues/3405)). ([3f098c30](https://github.com/fluttercommunity/plus_plugins/commit/3f098c30320e1595c06b093e8eb9827a44435c5d))
- **FIX**(device_info_plus): device memory null error on Safari and Firefox ([#3401](https://github.com/fluttercommunity/plus_plugins/issues/3401)). ([2b7cb088](https://github.com/fluttercommunity/plus_plugins/commit/2b7cb0888cd725dc69e409590861fe8118058c4d))
- **FIX**(device_info_plus): add @Suppress(deprecate) to Build.SERIAL ([#3402](https://github.com/fluttercommunity/plus_plugins/issues/3402)). ([8e70d3f3](https://github.com/fluttercommunity/plus_plugins/commit/8e70d3f33d5f1c005dbb1aef733a8a8578989bac))

## 11.2.0

- **REFACTOR**(all): Use range of flutter_lints for broader compatibility ([#3371](https://github.com/fluttercommunity/plus_plugins/issues/3371)). ([8a303add](https://github.com/fluttercommunity/plus_plugins/commit/8a303add3dee1acb8bac5838246490ed8a0fe408))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Demonstrates how to use the device_info_plus plugin.
dependencies:
flutter:
sdk: flutter
device_info_plus: ^11.2.0
device_info_plus: ^11.2.2

dev_dependencies:
flutter_driver:
Expand Down
Loading

0 comments on commit 28cc5af

Please sign in to comment.