0 purchases
advertising info
advertising_info #
A Flutter plugin for fetching Advertising info from Android and iOS
Usage #
Add advertising_info to your package's pubspec.yaml file:
Get package by $ flutter pub get
Getting Started #
Import it to your source code
import 'package:advertising_info/advertising_info.dart';
copied to clipboard
Call AdvertisingInfo.read(); to get Advertising info from platform(iOS or Android)
AdvertisingInfo advertisingInfo = await AdvertisingInfo.read();
copied to clipboard
Call AdvertisingInfo.id to get advertising id (IDFA for iOS, GAID for Android)
String advertising_id = advertisingInfo.id
copied to clipboard
Call AdvertisingInfo.isLimitAdTrackingEnabled to check if user has limited Ad tracking or not.
Bool isLAT = advertisingInfo.isLimitAdTrackingEnabled
copied to clipboard
false: Ad Tracking is not limited (Able to get advertising id)
true: Ad Tracking is limited (Unable to get advertising id)
Call AdvertisingInfo.authorizationStatus to check authorization status by users. (mainly for iOS14)
AauthorizationStatus status = advertisingInfo.authorizationStatus
copied to clipboard
AauthorizationStatus is an enum with values below
enum AdTrackingAuthorizationStatus {
notDetermined,
restricted,
denied,
authorized
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.