gms_check
1.1.0, released 3 months ago by sofluffy.io
Check if Google Mobile Services is available on the Android device.
What it does
Checks if Google Services are available on an Android device and defaults to true on other platforms. It prevents initializing unnecessary services that require Google Services.
AI-written summary of version 1.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to avoid initializing services that require Google Services on devices without them
- You need to conditionally initialize Firebase services based on GMS availability
Skip it when
- You do not use any Google Services or Firebase features in your app
Strengths
- Simple API with a single check method
- Uses OptionalMethodChannel to prevent MissingPluginException on other platforms
Weaknesses
- Only checks availability on Android, returning true by default for other platforms
Setup
- Kind
- Plugin (native code)
- Effort
- Low
- Code generation
- No
- Direct dependencies
- 0
Call await GmsCheck().checkGmsAvailability() once before runApp in main().
Future<void> main() async {
await GmsCheck().checkGmsAvailability();
runApp(const MyApp());
}Alternatives
Packages that do the same job and could replace gms_check.
- google_api_availability
Check the availability of Google Play services on an Android device.
88Compare - 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 - flutter_ble_peripheral
Set a device into BLE peripheral mode and advertise custom services.
86Compare