flutter_adto_adid 1.1.0
flutter_adto_adid: ^1.1.0 copied to clipboard
The advertising identifier (IDFA after App Tracking Transparency, GAID) for flutter_adto, kept out of the core SDK.
flutter_adto_adid #
The advertising identifier for flutter_adto: the IDFA on iOS once App Tracking Transparency allows it, the GAID on Android.
flutter_adto itself never reads an advertising identifier and links no ad
framework. This package is the only one that links AdSupport and
AppTrackingTransparency (iOS) and Play services ads-identifier with the
AD_ID permission (Android). An app that does not depend on it ships none of
them.
Use #
import 'package:flutter_adto/flutter_adto.dart';
import 'package:flutter_adto_adid/flutter_adto_adid.dart';
// iOS: the ATT prompt, once. Ask before initialize() so the install
// registration can carry the IDFA; the app must be active.
await AdtoAdId.requestTracking();
await FlutterAdto().initialize(const AdtoConfig(
apiKey: 'adto_pub_your_sdk_key',
advertisingIdProvider: AdtoAdId.provider,
));
AdtoAdId.provider only reads; it never prompts. When the user did not
allow tracking (ATT not authorized, an Android opt-out, the all-zero id) the
install carries ad_tracking_limited: true and no id. A AdtoConfig.collect
set without AdtoCollection.adId turns the read off even with a provider.
Platform setup #
- iOS: add
NSUserTrackingUsageDescriptiontoInfo.plist; without itrequestTracking()does not prompt (iOS would terminate the app). The bundled privacy manifest declares the IDFA as a Device ID used for tracking. - Android: the
AD_IDpermission merges into your manifest. Declare "Advertising ID" in the Play Console (Policy → App content → Advertising ID) and in Data safety.
Store disclosures #
| Store | What to declare |
|---|---|
| App Store (App Privacy) | Device ID, used for tracking (third-party advertising or developer advertising, as you use it) |
| Google Play (Data safety) | Device or other IDs: Advertising ID; collected, for advertising or marketing and analytics |
The full table for every AdtoCollection value is on
docs.adto.app/sdk/device-data-and-privacy.