Skip to content
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
5 changes: 5 additions & 0 deletions packages/android_intent_plus/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 3.1.2

- Fix explicit intent fallback to implicit
- Update Android Gradle plugin and Gradle verion

## 3.1.1+1

- Add issue_tracker link.
Expand Down
2 changes: 1 addition & 1 deletion packages/android_intent_plus/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,6 @@ Intent buildIntent(
intent.setComponent(componentName);
}
}
if (intent.resolveActivity(applicationContext.getPackageManager()) == null) {
Log.i(TAG, "Cannot resolve explicit intent");
}

return intent;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,17 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
action, flags, category, data, arguments, packageName, componentName, type);

if ("launch".equalsIgnoreCase(call.method)) {
sender.send(intent);

if (intent != null && !sender.canResolveActivity(intent)) {
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just moved this check from buildIntent() to be able to set package as null, so the system just opens a chooser.

Log.i(TAG, "Cannot resolve explicit intent, falling back to implicit");
intent.setPackage(null);
}

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 ("sendBroadcast".equalsIgnoreCase(call.method)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 1 addition & 1 deletion packages/android_intent_plus/example/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
}

dependencies {
classpath 'com.android.tools.build:gradle:7.0.2'
classpath 'com.android.tools.build:gradle:7.3.0'
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
org.gradle.jvmargs=-Xmx1536M
android.enableJetifier=true
android.useAndroidX=true
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#Tue Oct 05 13:40:15 CEST 2021
#Sun Oct 02 17:46:54 EEST 2022
distributionBase=GRADLE_USER_HOME
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.5.1-bin.zip
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
2 changes: 1 addition & 1 deletion 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: 3.1.1+1
version: 3.1.2
homepage: https://plus.fluttercommunity.dev/
repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/
issue_tracker: https://github.com/fluttercommunity/plus_plugins/labels/android_intent_plus
Expand Down