advertising_info 0.1.1

Flutter Android iOS

A Flutter plugin for fetching Advertising info from Android and iOS

advertising_info #

A Flutter plugin for fetching Advertising info from Android and iOS

Usage #

  1. Add advertising_info to your package's pubspec.yaml file:
  2. Get package by $ flutter pub get

Getting Started #

Import it to your source code

import 'package:advertising_info/advertising_info.dart';

Call AdvertisingInfo.read(); to get Advertising info from platform(iOS or Android)

AdvertisingInfo advertisingInfo = await AdvertisingInfo.read();

Call AdvertisingInfo.id to get advertising id (IDFA for iOS, GAID for Android)

String advertising_id = advertisingInfo.id

Call AdvertisingInfo.isLimitAdTrackingEnabled to check if user has limited Ad tracking or not.

Bool isLAT = advertisingInfo.isLimitAdTrackingEnabled
  • 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

AauthorizationStatus is an enum with values below

enum AdTrackingAuthorizationStatus {
  notDetermined,
  restricted,
  denied,
  authorized
}
0
likes
90
pub points
36%
popularity

A Flutter plugin for fetching Advertising info from Android and iOS

Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

liahoo@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on advertising_info