setDisableAaidCollection method
Disable AAID (Google Advertising ID) collection on Android When disabled, the SDK will not collect or send the Google Advertising ID (GAID). This is useful for apps targeting children or families to comply with Google Play's Family Policy.
Note: This only affects Android. For iOS, use the disableIdfa parameter in init()
- Parameter disabled: Whether AAID collection should be disabled (default: true)
Implementation
Future<void> setDisableAaidCollection([bool disabled = true]) async {
try {
await LinkRunnerNativeBridge.setDisableAaidCollection(disabled: disabled);
developer.log(
'Linkrunner: AAID collection ${disabled ? 'disabled' : 'enabled'} successfully',
name: packageName,
);
} catch (e) {
developer.log(
'Linkrunner: Failed to ${disabled ? 'disable' : 'enable'} AAID collection',
name: packageName,
error: e,
);
}
}