A Flutter plugin to check the availability of Google Play services on the current device.
To use this plugin, add
google_api_availability as a dependency in your pubspec.yaml file. For example:
dependencies: google_api_availability: '^1.0.6'
NOTE: There's a known issue with integrating plugins that use Swift into a Flutter project created with the Objective-C template. See issue Flutter#16049 for help on integration.
To check the availability of Google Play services on the current device, you can use the
checkGooglePlayServicesAvailability method. This could be helpful to provide a more friendly experience to users in case an user-action is required to enable support for Google Play services (More information can be found here).
import `package:google_api_availability/google_api_availability.dart`; GooglePlayServicesAvailability availability = await GoogleApiAvailability().checkGooglePlayServicesAvailability();
If you want to show a dialog by the Android system with more information and show a possible fix to the user you can do:
import `package:google_api_availability/google_api_availability.dart`; GooglePlayServicesAvailability availability = await GoogleApiAvailability().checkGooglePlayServicesAvailability(true);
Note that on iOS this will always return false!
See also the example project for a complete implementation.
Please file any issues, bugs or feature request as an issue on our GitHub page.
If you would like to contribute to the plugin (e.g. by improving the documentation, solving a bug or adding a cool new feature), please carefully review our contribution guide and send us your pull request.
Demonstrates how to use the google_api_availability plugin.
This project is a starting point for a Flutter application.
A few resources to get you started if this is your first Flutter project:
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.
Add this to your package's pubspec.yaml file:
dependencies: google_api_availability: ^2.0.0
You can install packages from the command line:
$ flutter packages get
Alternatively, your editor might support
flutter packages get.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
|2.0.0||Feb 20, 2019|
|1.0.6+1||Feb 20, 2019|
|1.0.6||Feb 13, 2019|
|1.0.5||Feb 12, 2019|
|1.0.4||Oct 10, 2018|
|1.0.3||Oct 5, 2018|
|1.0.2||Sep 18, 2018|
|1.0.1||Sep 17, 2018|
|1.0.0||Sep 4, 2018|
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
We analyzed this package on Mar 6, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:
Detected platforms: Flutter
References Flutter, and has no conflicting libraries.