google_api_availability
5.1.0, released 2 weeks ago by baseflow.com
Check the availability of Google Play services on an Android device.
What it does
A Flutter plugin that allows developers to check the availability of Google Play services on the current device. It provides methods to check availability and handle user resolutions on Android.
AI-written summary of version 5.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to verify if Google Play services are available before using dependent features.
- You want to provide a friendly prompt or fix option to users when Google Play services are missing or outdated.
Skip it when
- You are developing for iOS, as support for iOS has been removed.
- You do not use Google Play services in your app.
Strengths
- Simple API to query Google Play services availability.
- Supports showing system dialogs to resolve availability issues.
Weaknesses
- Android only (iOS is not supported).
- Requires proper native configuration for Android.
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 2
Add the dependency to pubspec.yaml. Ensure proper Android build settings as per standard Android plugins.
import 'package:google_api_availability/google_api_availability.dart';
GooglePlayServicesAvailability availability = await GoogleApiAvailability.instance.checkGooglePlayServicesAvailability();Alternatives
Packages that do the same job and could replace google_api_availability.
- gms_check
Check if Google Mobile Services is available on the Android device.
65Compare - google_huawei_availability
Detect Google Play Services and Huawei HMS Services availability on Android devices.
39Compare - flutter_foreground_task
Implement and manage foreground services on Android and iOS platforms.
89Compare - safe_device
Detect jailbreak/root, emulator, mock location and other safety flags on iOS/Android devices.
87Compare