▸Install the Flutter SDK
# pubspec.yaml
dependencies:
flutter:
sdk: flutter
respectlytics_flutter: ^3.0.0
Pure Dart — no platform channels for analytics. Same code on every platform Flutter compiles to (iOS, Android, web, macOS, Windows, Linux). On web, events are sent via the REST API; mobile platforms use the same path.
▸Initialize Respectlytics in Flutter
import 'package:flutter/material.dart';
import 'package:respectlytics_flutter/respectlytics_flutter.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await Respectlytics.configure(appKey: '<YOUR_APP_KEY>');
runApp(const MyApp());
}
Initialize in main() after WidgetsFlutterBinding.ensureInitialized() and before runApp(). The future completes immediately on configuration; events queued before completion are flushed once the network is available.
✦Privacy & implementation notes
Google's recent policy auto-declares the AD_ID permission in your merged manifest if any dependency uses the Ads SDK or AdvertisingIdClient. Many teams discover the permission only when Google Play flags it — usually from a transitive dependency they didn't realize was pulling Ads SDK. Respectlytics's Android SDK has zero Google Play Services dependencies, so it cannot contribute to that merge.
The Google Play Data Safety form's "Advertising or marketing IDs" category is one of the most-flagged categories in audits. Apps that declare it correctly because of an embedded Ads SDK get fine; apps that declare "No" without realizing a transitive dependency does collect AAID get rejected. Respectlytics's no-Ads-SDK posture means you can answer "No" honestly for our SDK's contribution.
The Flutter SDK is pure Dart. No MethodChannel, no platform-specific iOS or Android plugin code. The same code runs on every platform Flutter supports — including web and desktop targets. This eliminates one common audit surface ("what's the Android implementation doing?").
Always initialize after WidgetsFlutterBinding.ensureInitialized() and before runApp(). If you skip the binding step, the configure call will throw on platforms that need a binding for asynchronous I/O. The SDK documentation example uses this pattern by default.
⇋How this compares to other analytics SDKs
| AAID handling | Firebase Analytics | Mixpanel | AppsFlyer | Respectlytics |
|---|---|---|---|---|
| Reads AAID via AdvertisingIdClient | Yes | Yes (optional) | Yes (mandatory) | No |
| Adds AD_ID permission to manifest | Yes (auto-merged) | Conditional | Yes | No |
| Stores AAID in events | Yes | Optional | Yes | Never |
| Effect on Google Play Data Safety | Triggers ad-ID category | Triggers ad-ID category | Triggers ad-ID category | No ad-ID category from us |
| Cross-app tracking surface | AAID-linked | AAID-linked | AAID-linked | None |
❓Frequently asked questions
How do we tell if AAID is being collected by another SDK in our app?
Check the merged manifest at app/build/intermediates/merged_manifests/release/AndroidManifest.xml — if it contains <uses-permission android:name="com.google.android.gms.permission.AD_ID"/>, some dependency is contributing it. Often it's Firebase Analytics, AdMob, or an attribution SDK pulled by your build. Removing those dependencies removes the permission.
Will Google Play reject my app for not declaring AD_ID?
No. Apps that don't use AAID don't need to declare the permission — and Google's Data Safety form lets you tick "No, this app does not collect advertising ID". Confirm with your legal team based on what other SDKs in your app do.
Does Respectlytics use any device-level identifier on Android?
Only the rotating session_id (RAM-only, regenerated every 2 hours and on app restart). No Settings.Secure.ANDROID_ID, no Build.SERIAL, no MAC address, no IMEI.
What happens on devices without Google Play Services?
Same as on devices with Google Play Services: no AAID, just the session_id. Respectlytics has no Google Play Services dependency at all, so the SDK's behaviour is identical on non-GMS devices (Huawei AppGallery, F-Droid, etc.).