setDisableAaidCollection static method
Disable AAID (Google Advertising ID) collection on Android This is useful for apps targeting children or families to comply with Google Play's Family Policy Note: This only affects Android. iOS uses disableIdfa parameter in init()
Implementation
static Future<void> setDisableAaidCollection({required bool disabled}) async {
try {
await _channel.invokeMethod('setDisableAaidCollection', {
'disabled': disabled,
});
developer.log('AAID collection ${disabled ? 'disabled' : 'enabled'} successfully',
name: packageName);
} on PlatformException catch (e) {
developer.log('Failed to ${disabled ? 'disable' : 'enable'} AAID collection: ${e.message}',
error: e, name: packageName);
rethrow;
}
}