# android_intent_plus 3.1.8

Flutter plugin for launching Android Intents. Not supported on iOS.




## Installing
```
export PUB_HOSTED_URL=https://pub.mirror.p-hatan.com
flutter pub add 'android_intent_plus:3.1.8'
```
Published: 2023-04-26T07:16:15.379539Z
Expected archive SHA-256: 28a665a6cd505a03ba480d78a36a1959c24de0c32083dd1e82766c99299cfca3

Available in cache; verification: upstream_checksum
## Direct dependencies
- flutter: map[sdk:flutter]
- meta: ^1.3.0
- platform: ^3.1.0

## Package README (untrusted upstream documentation)
# Android Intent Plugin for Flutter

[![Flutter Community: android_intent_plus](https://fluttercommunity.dev/_github/header/android_intent_plus)](https://github.com/fluttercommunity/community)

[![pub package](https://img.shields.io/pub/v/android_intent_plus.svg)](https://pub.dev/packages/android_intent_plus)
[![pub points](https://img.shields.io/pub/points/android_intent_plus?color=2E8B57&label=pub%20points)](https://pub.dev/packages/android_intent_plus/score)
[![android_intent_plus](https://github.com/fluttercommunity/plus_plugins/actions/workflows/android_intent_plus.yaml/badge.svg)](https://github.com/fluttercommunity/plus_plugins/actions/workflows/android_intent_plus.yaml)

<center><a href="https://flutter.dev/docs/development/packages-and-plugins/favorites" target="_blank" rel="noreferrer noopener"><img src="../../website/static/img/flutter-favorite-badge.png" width="100" alt="build"></a></center>

This plugin allows Flutter apps to launch arbitrary intents when the platform is Android.

> **Warning**
>
> If the plugin is invoked on iOS, it will crash your app. In checked mode, we assert that the platform should be Android.

Use it by specifying action, category, data and extra arguments for the intent.
It does not support returning the result of the launched activity. Sample usage:

```dart
if (platform.isAndroid) {
  AndroidIntent intent = AndroidIntent(
      action: 'action_view',
      data: 'https://play.google.com/store/apps/details?'
          'id=com.google.android.apps.myapp',
      arguments: {'authAccount': currentUserEmail},
  );
  await intent.launch();
}
```

See documentation on the AndroidIntent class for details on each parameter.

Action parameter can be any action including a custom class name to be invoked.
If a standard android action is required, the recommendation is to add support
for it in the plugin and use an action constant to refer to it. For instance:

`'action_view'` translates to `android.os.Intent.ACTION_VIEW`

`'action_location_source_settings'` translates to `android.settings.LOCATION_SOURCE_SETTINGS`

`'action_application_details_settings'` translates to `android.settings.ACTION_APPLICATION_DETAILS_SETTINGS`

```dart
if (platform.isAndroid) {
  final AndroidIntent intent = AndroidIntent(
    action: 'action_application_details_settings',
    data: 'package:com.example.app', // replace com.example.app with your applicationId
  );
  await intent.launch();
}

```

Feel free to add support for additional Android intents.

The Dart values supported for the arguments parameter, and their corresponding
Android values, are listed [here](https://flutter.dev/platform-channels/#codec).
On the Android side, the arguments are used to populate an Android `Bundle`
instance. This process currently restricts the use of lists to homogeneous lists
of integers or strings.

> **Note**
>
> There is no similar method for iOS. Instead, the
> [url_launcher](https://pub.dartlang.org/packages/url_launcher) plugin
> can be used for deep linking. Url launcher can also be used for creating
> ACTION_VIEW intents for Android, however this intent plugin also allows
> clients to set extra parameters for the intent.

## Platform Support

| Android |
| :-----: |
|   ✔️    |

## Android 11 package visibility

Android 11 introduced new permissions for package visibility.
If you plan to use `canResolveActivity()` method, you need to specify queries in `AndroidManifest.xml` with specific package names:

https://developer.android.com/training/package-visibility/declaring

you can read more about package visibility on Android on Android Developers blog:

https://medium.com/androiddevelopers/package-visibility-in-android-11-cc857f221cd9

or Official Documentation

https://developer.android.com/training/package-visibility

please note that some packages are visible automatically and you don't have to specify queries:

https://developer.android.com/training/package-visibility/automatic

## Learn more

- [API Documentation](https://pub.dev/documentation/android_intent_plus/latest/)
- [Plugin documentation website](https://plus.fluttercommunity.dev/docs/android_intent_plus/overview)

## Changelog
## 3.1.8

 - **FIX**(android_intent_plus): Add compatibility with AGP 8 (Android Gradle Plugin) (#1699).

## 3.1.7

 - **REFACTOR**(all): Remove all manual dependency_overrides (#1628).
 - **FIX**(all): Fix depreciations for flutter 3.7 and 2.19 dart (#1529).

## 3.1.6

 - **DOCS**: Updates for READMEs and website pages (#1389).

## 3.1.5

 - **FIX**: lint warnings - add missing dependency for tests (#1233).

## 3.1.4

 - **DOCS**: Add documentation for canResolveActivity.

## 3.1.3

 - **CHORE**: Version tagging using melos.

## 3.1.2

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

## 3.1.1+1

- Add issue_tracker link.

## 3.1.1

- Fix embedding issue in example
- Update Platform dependency to not use deprecated function

## 3.1.0

- Added `arrayArguments` to explicitly pass array values to an intent

## 3.0.2

- Fixed the buildIntent method to do not set the pacakage to null if it's not resolvable
- Updated the example of resolving intent with explicitly defined package name

## 3.0.1

- Upgrade dependencies and Android compile version
- Remove some leftover code of Android v1 embedding

## 3.0.0

- Remove deprecated method `registerWith` (of Android v1 embedding)

## 2.1.0

- migrate integration_test to flutter sdk

## 2.0.0

- increase flutter SDK version to 1.20.0

## 1.0.3

- clean up ios folder
- rename channel name to dev.fluttercommunity.plus in java tests

## 1.0.2

- Android: migrate to mavenCentral

## 1.0.1

- Improve documentation

## 1.0.0

- Null safety support.

## 0.4.2

- Add launchChooser method, which uses Intent.createChooser internally.
- Add sendBroadcast method, which uses context.sendBroadcast() internally.

## 0.4.1

- Renamed Method Channel and changed Java package to avoid collision with android_intent

## 0.4.0

- Transfer to plus-plugins monorepo

## 0.3.8

- Transfer package to Flutter Community under new name `android_intent_plus`.

## 0.3.7+2

- Declare API stability and compatibility with `1.0.0` (more details at: https://github.com/flutter/flutter/wiki/Package-migration-to-1.0.0).

## 0.3.7+1

- Fix CocoaPods podspec lint warnings.

## 0.3.7

- Add a `Future<bool> canResolveActivity` method to the AndroidIntent class. It
  can be used to determine whether a device supports a particular intent or has
  an app installed that can resolve it. It is based on PackageManager
  [resolveActivity](<https://developer.android.com/reference/android/content/pm/PackageManager#resolveActivity(android.content.Intent,%20int)>).

## 0.3.6+1

- Bump the minimum Flutter version to 1.12.13+hotfix.5.
- Bump the minimum Dart version to 2.3.0.
- Uses Darts spread operator to build plugin arguments internally.
- Remove deprecated API usage warning in AndroidIntentPlugin.java.
- Migrates the Android example to V2 embedding.

## 0.3.6

- Marks the `action` parameter as optional
- Adds an assertion to ensure the intent receives an action, component or both.

## 0.3.5+1

- Make the pedantic dev_dependency explicit.

## 0.3.5

- Add support for [setType](<https://developer.android.com/reference/android/content/Intent.html#setType(java.lang.String)>) and [setDataAndType](<https://developer.android.com/reference/android/content/Intent.html#setDataAndType(android.net.Uri,%20java.lang.String)>) parameters.

## 0.3.4+8

- Remove the deprecated `author:` field from pubspec.yaml
- Migrate the plugin to the pubspec platforms manifest.
- Require Flutter SDK 1.10.0 or greater.

## 0.3.4+7

- Fix pedantic linter errors.

## 0.3.4+6

- Add missing DartDocs for public members.

## 0.3.4+5

- Remove AndroidX warning.

## 0.3.4+4

- Include lifecycle dependency as a compileOnly one on Android to resolve
  potential version conflicts with other transitive libraries.

## 0.3.4+3

- Android: Use android.arch.lifecycle instead of androidx.lifecycle:lifecycle in `build.gradle` to support apps that has not been migrated to AndroidX.

## 0.3.4+2

- Fix resolveActivity not respecting the provided componentName.

## 0.3.4+1

- Fix minor lints in the Java platform code.
- Add smoke e2e tests for the V2 embedding.
- Fully migrate the example app to AndroidX.

## 0.3.4

- Migrate the plugin to use the V2 Android engine embedding. This shouldn't
  affect existing functionality. Plugin authors who use the V2 embedding can now
  instantiate the plugin and expect that it correctly responds to app lifecycle
  changes.

## 0.3.3+3

- Define clang module for iOS.

## 0.3.3+2

- Update and migrate iOS example project.

## 0.3.3+1

- Added "action_application_details_settings" action to open application info settings .

## 0.3.3

- Added "flags" option to call intent.addFlags(int) in native.

## 0.3.2

- Added "action_location_source_settings" action to start Location Settings Activity.

## 0.3.1+1

- Fix Gradle version.

## 0.3.1

- Add a new componentName parameter to help the intent resolution.

## 0.3.0+2

- Bump the minimum Flutter version to 1.2.0.
- Add template type parameter to `invokeMethod` calls.

## 0.3.0+1

- Log a more detailed warning at build time about the previous AndroidX
  migration.

## 0.3.0

- **Breaking change**. Migrate from the deprecated original Android Support
  Library to AndroidX. This shouldn't result in any functional changes, but it
  requires any Android apps using this plugin to [also
  migrate](https://developer.android.com/jetpack/androidx/migrate) if they're
  using the original support library.

## 0.2.1

- Updated Gradle tooling to match Android Studio 3.1.2.

## 0.2.0

- **Breaking change**. Set SDK constraints to match the Flutter beta release.

## 0.1.1

- Simplified and upgraded Android project template to Android SDK 27.
- Updated package description.

## 0.1.0

- **Breaking change**. Upgraded to Gradle 4.1 and Android Studio Gradle plugin
  3.0.1. Older Flutter projects need to upgrade their Gradle setup as well in
  order to use this version of the plugin. Instructions can be found
  [here](https://github.com/flutter/flutter/wiki/Updating-Flutter-projects-to-Gradle-4.1-and-Android-Studio-Gradle-plugin-3.0.1).

## 0.0.3

- Add FLT prefix to iOS types.

## 0.0.2

- Add support for transferring structured Dart values into Android Intent
  instances as extra Bundle data.

## 0.0.1

- Initial release







 
