From 53e89fa2f54a78593ef687e647fe279be9b5bad9 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sun, 3 Jan 2021 10:11:18 +0100 Subject: [PATCH 1/4] implement send intent as broadcast --- .../plus/androidintent/IntentSender.java | 74 ++++++++++++------- .../androidintent/MethodCallHandlerImpl.java | 3 + .../example/android/app/build.gradle | 1 + .../android/app/src/main/AndroidManifest.xml | 52 +++++++------ .../EmbeddingV1Activity.java | 4 +- .../androidintentexample/MainActivity.java | 22 ++++++ .../MyBroadcastReceiver.java | 15 ++++ .../app/src/main/res/values/strings.xml | 1 + .../android_intent_plus/example/lib/main.dart | 15 +++- .../test_driver/android_intent_plus_e2e.dart | 9 ++- .../lib/android_intent.dart | 14 ++++ .../test/android_intent_test.dart | 14 ++++ 12 files changed, 171 insertions(+), 53 deletions(-) create mode 100644 packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java create mode 100644 packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MyBroadcastReceiver.java create mode 100644 packages/android_intent_plus/example/android/app/src/main/res/values/strings.xml diff --git a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java index d66e8a0269..8e82de0337 100644 --- a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java +++ b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java @@ -9,14 +9,19 @@ import android.os.Bundle; import android.text.TextUtils; import android.util.Log; + import androidx.annotation.Nullable; -/** Forms and launches intents. */ +/** + * Forms and launches intents. + */ public final class IntentSender { private static final String TAG = "IntentSender"; - @Nullable private Activity activity; - @Nullable private Context applicationContext; + @Nullable + private Activity activity; + @Nullable + private Context applicationContext; /** * Caches the given {@code activity} and {@code applicationContext} to use for sending intents @@ -67,6 +72,19 @@ public void launchChooser(Intent intent, String title) { send(Intent.createChooser(intent, title)); } + /** + * Creates an intent and sends it as Broadcast. + */ + public void sendBroadcast(Intent intent) { + if (applicationContext == null) { + Log.wtf(TAG, "Trying to send broadcast before the applicationContext was initialized."); + return; + } + + Log.v(TAG, "Sending broadcast " + intent); + applicationContext.sendBroadcast(intent); + } + /** * Verifies the given intent and returns whether the application context class can resolve it. * @@ -77,7 +95,7 @@ public void launchChooser(Intent intent, String title) { * * @param intent Fully built intent. * @return Whether the package manager found {@link android.content.pm.ResolveInfo} using its - * {@link PackageManager#resolveActivity(Intent, int)} method. + * {@link PackageManager#resolveActivity(Intent, int)} method. * @see #buildIntent(String, Integer, String, Uri, Bundle, String, ComponentName, String) */ boolean canResolveActivity(Intent intent) { @@ -91,12 +109,16 @@ boolean canResolveActivity(Intent intent) { return packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null; } - /** Caches the given {@code activity} to use for {@link #send}. */ + /** + * Caches the given {@code activity} to use for {@link #send}. + */ void setActivity(@Nullable Activity activity) { this.activity = activity; } - /** Caches the given {@code applicationContext} to use for {@link #send}. */ + /** + * Caches the given {@code applicationContext} to use for {@link #send}. + */ void setApplicationContext(@Nullable Context applicationContext) { this.applicationContext = applicationContext; } @@ -104,30 +126,30 @@ void setApplicationContext(@Nullable Context applicationContext) { /** * Constructs a new intent with the data specified. * - * @param action the Intent action, such as {@code ACTION_VIEW}. - * @param flags forwarded to {@link Intent#addFlags(int)} if non-null. - * @param category forwarded to {@link Intent#addCategory(String)} if non-null. - * @param data forwarded to {@link Intent#setData(Uri)} if non-null and 'type' parameter is null. - * If both 'data' and 'type' is non-null they're forwarded to {@link - * Intent#setDataAndType(Uri, String)} - * @param arguments forwarded to {@link Intent#putExtras(Bundle)} if non-null. - * @param packageName forwarded to {@link Intent#setPackage(String)} if non-null. This is forced - * to null if it can't be resolved. + * @param action the Intent action, such as {@code ACTION_VIEW}. + * @param flags forwarded to {@link Intent#addFlags(int)} if non-null. + * @param category forwarded to {@link Intent#addCategory(String)} if non-null. + * @param data forwarded to {@link Intent#setData(Uri)} if non-null and 'type' parameter is null. + * If both 'data' and 'type' is non-null they're forwarded to {@link + * Intent#setDataAndType(Uri, String)} + * @param arguments forwarded to {@link Intent#putExtras(Bundle)} if non-null. + * @param packageName forwarded to {@link Intent#setPackage(String)} if non-null. This is forced + * to null if it can't be resolved. * @param componentName forwarded to {@link Intent#setComponent(ComponentName)} if non-null. - * @param type forwarded to {@link Intent#setType(String)} if non-null and 'data' parameter is - * null. If both 'data' and 'type' is non-null they're forwarded to {@link - * Intent#setDataAndType(Uri, String)} + * @param type forwarded to {@link Intent#setType(String)} if non-null and 'data' parameter is + * null. If both 'data' and 'type' is non-null they're forwarded to {@link + * Intent#setDataAndType(Uri, String)} * @return Fully built intent. */ Intent buildIntent( - @Nullable String action, - @Nullable Integer flags, - @Nullable String category, - @Nullable Uri data, - @Nullable Bundle arguments, - @Nullable String packageName, - @Nullable ComponentName componentName, - @Nullable String type) { + @Nullable String action, + @Nullable Integer flags, + @Nullable String category, + @Nullable Uri data, + @Nullable Bundle arguments, + @Nullable String packageName, + @Nullable ComponentName componentName, + @Nullable String type) { if (applicationContext == null) { Log.wtf(TAG, "Trying to build an intent before the applicationContext was initialized."); return null; diff --git a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/MethodCallHandlerImpl.java b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/MethodCallHandlerImpl.java index 46ca514cd7..7200e0528f 100644 --- a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/MethodCallHandlerImpl.java +++ b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/MethodCallHandlerImpl.java @@ -97,6 +97,9 @@ public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) { String title = call.argument("chooserTitle"); sender.launchChooser(intent, title); 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 { diff --git a/packages/android_intent_plus/example/android/app/build.gradle b/packages/android_intent_plus/example/android/app/build.gradle index 48178f2be0..7862f2a7af 100644 --- a/packages/android_intent_plus/example/android/app/build.gradle +++ b/packages/android_intent_plus/example/android/app/build.gradle @@ -54,6 +54,7 @@ flutter { } dependencies { + implementation 'androidx.appcompat:appcompat:1.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' diff --git a/packages/android_intent_plus/example/android/app/src/main/AndroidManifest.xml b/packages/android_intent_plus/example/android/app/src/main/AndroidManifest.xml index 761c35fd64..c955419551 100644 --- a/packages/android_intent_plus/example/android/app/src/main/AndroidManifest.xml +++ b/packages/android_intent_plus/example/android/app/src/main/AndroidManifest.xml @@ -1,43 +1,51 @@ + - + + + + + android:label="android_intent_example"> - - - + + - - + + + - + + + + + + + + - - - diff --git a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java index c510fc8f16..1e990756ce 100644 --- a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java +++ b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java @@ -4,7 +4,9 @@ package io.flutter.plugins.androidintentexample; +import android.content.IntentFilter; import android.os.Bundle; + import dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin; import io.flutter.app.FlutterActivity; @@ -13,6 +15,6 @@ public class EmbeddingV1Activity extends FlutterActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidIntentPlugin.registerWith( - registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); + registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); } } diff --git a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java new file mode 100644 index 0000000000..8a84c16e66 --- /dev/null +++ b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java @@ -0,0 +1,22 @@ +package io.flutter.plugins.androidintentexample; + +import android.content.IntentFilter; +import android.os.Bundle; + +import dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin; +import io.flutter.app.FlutterActivity; + +public class MainActivity extends FlutterActivity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + AndroidIntentPlugin.registerWith( + registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); + + IntentFilter filter = new IntentFilter("com.example.broadcast"); + MyBroadcastReceiver receiver = new MyBroadcastReceiver(); + registerReceiver(receiver, filter); + } +} diff --git a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MyBroadcastReceiver.java b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MyBroadcastReceiver.java new file mode 100644 index 0000000000..ab66f6759f --- /dev/null +++ b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MyBroadcastReceiver.java @@ -0,0 +1,15 @@ +package io.flutter.plugins.androidintentexample; + +import android.content.BroadcastReceiver; +import android.content.Context; +import android.content.Intent; +import android.util.Log; +import android.widget.Toast; + +public class MyBroadcastReceiver extends BroadcastReceiver { + @Override + public void onReceive(Context context, Intent intent) { + Log.d("MyBroadcastReceiver", "Got Intent: " + intent.toString()); + Toast.makeText(context, "Broadcast Received!", Toast.LENGTH_LONG).show(); + } +} diff --git a/packages/android_intent_plus/example/android/app/src/main/res/values/strings.xml b/packages/android_intent_plus/example/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000000..7abc06d3ba --- /dev/null +++ b/packages/android_intent_plus/example/android/app/src/main/res/values/strings.xml @@ -0,0 +1 @@ + diff --git a/packages/android_intent_plus/example/lib/main.dart b/packages/android_intent_plus/example/lib/main.dart index 9824f5af5b..352daf1f9e 100644 --- a/packages/android_intent_plus/example/lib/main.dart +++ b/packages/android_intent_plus/example/lib/main.dart @@ -65,11 +65,13 @@ class MyHomePage extends StatelessWidget { onPressed: _createAlarm, ), RaisedButton( - child: const Text( - 'Tap here to launch Intent with Chooser', - ), + child: const Text('Tap here to launch Intent with Chooser'), onPressed: _openChooser, ), + RaisedButton( + child: const Text('Tap here to send Intent as broadcast'), + onPressed: _sendBroadcast, + ), RaisedButton( child: const Text('Tap here to test explicit intents.'), onPressed: () => _openExplicitIntentsView(context), @@ -96,6 +98,13 @@ class MyHomePage extends StatelessWidget { ); intent.launchChooser('Chose an app'); } + + void _sendBroadcast() { + final intent = const AndroidIntent( + action: 'com.example.broadcast', + ); + intent.sendBroadcast(); + } } /// Launches intents to specific Android activities. diff --git a/packages/android_intent_plus/example/test_driver/android_intent_plus_e2e.dart b/packages/android_intent_plus/example/test_driver/android_intent_plus_e2e.dart index b6d9aed169..7e82d5c662 100644 --- a/packages/android_intent_plus/example/test_driver/android_intent_plus_e2e.dart +++ b/packages/android_intent_plus/example/test_driver/android_intent_plus_e2e.dart @@ -24,7 +24,7 @@ void main() { (Widget widget) => widget is Text && widget.data.startsWith('Tap here'), ), - findsNWidgets(3), + findsNWidgets(4), ); } else { expect( @@ -58,6 +58,13 @@ void main() { await intent.launchChooser('title'); }, skip: !Platform.isAndroid); + testWidgets('#sendBroadcast should not throw', (WidgetTester tester) async { + final intent = const AndroidIntent( + action: 'com.example.broadcast', + ); + await intent.sendBroadcast(); + }, skip: !Platform.isAndroid); + testWidgets('#canResolveActivity returns true when example Activity is found', (WidgetTester tester) async { final intent = AndroidIntent( diff --git a/packages/android_intent_plus/lib/android_intent.dart b/packages/android_intent_plus/lib/android_intent.dart index b939f0e375..c35089e18d 100644 --- a/packages/android_intent_plus/lib/android_intent.dart +++ b/packages/android_intent_plus/lib/android_intent.dart @@ -154,6 +154,20 @@ class AndroidIntent { ); } + /// Sends intent as broadcast. + /// + /// This works only on Android platforms. + Future sendBroadcast() async { + if (!_platform.isAndroid) { + return; + } + + await _channel.invokeMethod( + 'sendBroadcast', + _buildArguments(), + ); + } + /// Check whether the intent can be resolved to an activity. /// /// This works only on Android platforms. diff --git a/packages/android_intent_plus/test/android_intent_test.dart b/packages/android_intent_plus/test/android_intent_test.dart index d9c94e1a80..50b34b3c3b 100644 --- a/packages/android_intent_plus/test/android_intent_test.dart +++ b/packages/android_intent_plus/test/android_intent_test.dart @@ -155,6 +155,20 @@ void main() { })); }); }); + + group('sendBroadcast', () { + test('send a broadcast', () async { + androidIntent = AndroidIntent.private( + action: 'com.example.broadcast', + channel: mockChannel, + platform: FakePlatform(operatingSystem: 'android'), + ); + await androidIntent.sendBroadcast(); + verify(mockChannel.invokeMethod('sendBroadcast', { + 'action': 'com.example.broadcast', + })); + }); + }); }); group('convertFlags ', () { From daf70b71e977a603ce2df76a24a89c5bb2395ccc Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sun, 3 Jan 2021 10:18:14 +0100 Subject: [PATCH 2/4] java format --- .../plugins/androidintentexample/EmbeddingV1Activity.java | 4 +--- .../io/flutter/plugins/androidintentexample/MainActivity.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java index 1e990756ce..c510fc8f16 100644 --- a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java +++ b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/EmbeddingV1Activity.java @@ -4,9 +4,7 @@ package io.flutter.plugins.androidintentexample; -import android.content.IntentFilter; import android.os.Bundle; - import dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin; import io.flutter.app.FlutterActivity; @@ -15,6 +13,6 @@ public class EmbeddingV1Activity extends FlutterActivity { protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidIntentPlugin.registerWith( - registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); + registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); } } diff --git a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java index 8a84c16e66..0c26573915 100644 --- a/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java +++ b/packages/android_intent_plus/example/android/app/src/main/java/io/flutter/plugins/androidintentexample/MainActivity.java @@ -2,7 +2,6 @@ import android.content.IntentFilter; import android.os.Bundle; - import dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin; import io.flutter.app.FlutterActivity; @@ -13,7 +12,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); AndroidIntentPlugin.registerWith( - registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); + registrarFor("dev.fluttercommunity.plus.androidintent.AndroidIntentPlugin")); IntentFilter filter = new IntentFilter("com.example.broadcast"); MyBroadcastReceiver receiver = new MyBroadcastReceiver(); From d135054abd5cce5577af451b79e0302ac45539c9 Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sun, 3 Jan 2021 10:21:35 +0100 Subject: [PATCH 3/4] java format --- .../plus/androidintent/IntentSender.java | 65 ++++++++----------- 1 file changed, 27 insertions(+), 38 deletions(-) diff --git a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java index 8e82de0337..aa909ea7ce 100644 --- a/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java +++ b/packages/android_intent_plus/android/src/main/java/dev/fluttercommunity/plus/androidintent/IntentSender.java @@ -9,19 +9,14 @@ import android.os.Bundle; import android.text.TextUtils; import android.util.Log; - import androidx.annotation.Nullable; -/** - * Forms and launches intents. - */ +/** Forms and launches intents. */ public final class IntentSender { private static final String TAG = "IntentSender"; - @Nullable - private Activity activity; - @Nullable - private Context applicationContext; + @Nullable private Activity activity; + @Nullable private Context applicationContext; /** * Caches the given {@code activity} and {@code applicationContext} to use for sending intents @@ -72,9 +67,7 @@ public void launchChooser(Intent intent, String title) { send(Intent.createChooser(intent, title)); } - /** - * Creates an intent and sends it as Broadcast. - */ + /** Creates an intent and sends it as Broadcast. */ public void sendBroadcast(Intent intent) { if (applicationContext == null) { Log.wtf(TAG, "Trying to send broadcast before the applicationContext was initialized."); @@ -95,7 +88,7 @@ public void sendBroadcast(Intent intent) { * * @param intent Fully built intent. * @return Whether the package manager found {@link android.content.pm.ResolveInfo} using its - * {@link PackageManager#resolveActivity(Intent, int)} method. + * {@link PackageManager#resolveActivity(Intent, int)} method. * @see #buildIntent(String, Integer, String, Uri, Bundle, String, ComponentName, String) */ boolean canResolveActivity(Intent intent) { @@ -109,16 +102,12 @@ boolean canResolveActivity(Intent intent) { return packageManager.resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY) != null; } - /** - * Caches the given {@code activity} to use for {@link #send}. - */ + /** Caches the given {@code activity} to use for {@link #send}. */ void setActivity(@Nullable Activity activity) { this.activity = activity; } - /** - * Caches the given {@code applicationContext} to use for {@link #send}. - */ + /** Caches the given {@code applicationContext} to use for {@link #send}. */ void setApplicationContext(@Nullable Context applicationContext) { this.applicationContext = applicationContext; } @@ -126,30 +115,30 @@ void setApplicationContext(@Nullable Context applicationContext) { /** * Constructs a new intent with the data specified. * - * @param action the Intent action, such as {@code ACTION_VIEW}. - * @param flags forwarded to {@link Intent#addFlags(int)} if non-null. - * @param category forwarded to {@link Intent#addCategory(String)} if non-null. - * @param data forwarded to {@link Intent#setData(Uri)} if non-null and 'type' parameter is null. - * If both 'data' and 'type' is non-null they're forwarded to {@link - * Intent#setDataAndType(Uri, String)} - * @param arguments forwarded to {@link Intent#putExtras(Bundle)} if non-null. - * @param packageName forwarded to {@link Intent#setPackage(String)} if non-null. This is forced - * to null if it can't be resolved. + * @param action the Intent action, such as {@code ACTION_VIEW}. + * @param flags forwarded to {@link Intent#addFlags(int)} if non-null. + * @param category forwarded to {@link Intent#addCategory(String)} if non-null. + * @param data forwarded to {@link Intent#setData(Uri)} if non-null and 'type' parameter is null. + * If both 'data' and 'type' is non-null they're forwarded to {@link + * Intent#setDataAndType(Uri, String)} + * @param arguments forwarded to {@link Intent#putExtras(Bundle)} if non-null. + * @param packageName forwarded to {@link Intent#setPackage(String)} if non-null. This is forced + * to null if it can't be resolved. * @param componentName forwarded to {@link Intent#setComponent(ComponentName)} if non-null. - * @param type forwarded to {@link Intent#setType(String)} if non-null and 'data' parameter is - * null. If both 'data' and 'type' is non-null they're forwarded to {@link - * Intent#setDataAndType(Uri, String)} + * @param type forwarded to {@link Intent#setType(String)} if non-null and 'data' parameter is + * null. If both 'data' and 'type' is non-null they're forwarded to {@link + * Intent#setDataAndType(Uri, String)} * @return Fully built intent. */ Intent buildIntent( - @Nullable String action, - @Nullable Integer flags, - @Nullable String category, - @Nullable Uri data, - @Nullable Bundle arguments, - @Nullable String packageName, - @Nullable ComponentName componentName, - @Nullable String type) { + @Nullable String action, + @Nullable Integer flags, + @Nullable String category, + @Nullable Uri data, + @Nullable Bundle arguments, + @Nullable String packageName, + @Nullable ComponentName componentName, + @Nullable String type) { if (applicationContext == null) { Log.wtf(TAG, "Trying to build an intent before the applicationContext was initialized."); return null; From 75992f701d3c22d91ddff81de2792a0b52ebfccb Mon Sep 17 00:00:00 2001 From: Miguel Beltran Date: Sun, 3 Jan 2021 10:24:53 +0100 Subject: [PATCH 4/4] release 0.4.2 --- packages/android_intent_plus/CHANGELOG.md | 3 ++- packages/android_intent_plus/pubspec.yaml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/android_intent_plus/CHANGELOG.md b/packages/android_intent_plus/CHANGELOG.md index b6348c264a..41b5d19637 100644 --- a/packages/android_intent_plus/CHANGELOG.md +++ b/packages/android_intent_plus/CHANGELOG.md @@ -1,6 +1,7 @@ -## pre-release +## 0.4.2 - Add launchChooser method, which uses Intent.createChooser internally. +- Add sendBroadcast method, which uses context.sendBroadcast() internally. ## 0.4.1 diff --git a/packages/android_intent_plus/pubspec.yaml b/packages/android_intent_plus/pubspec.yaml index 78973fb850..4d1ef5a977 100644 --- a/packages/android_intent_plus/pubspec.yaml +++ b/packages/android_intent_plus/pubspec.yaml @@ -1,6 +1,6 @@ name: android_intent_plus description: Flutter plugin for launching Android Intents. Not supported on iOS. -version: 0.4.1 +version: 0.4.2 homepage: https://plus.fluttercommunity.dev/ repository: https://github.com/fluttercommunity/plus_plugins/tree/main/packages/