Skip to content

wapoywapa/AdvertisingInfo

 
 

Repository files navigation

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
}

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 38.9%
  • Kotlin 22.4%
  • Ruby 17.9%
  • Swift 15.1%
  • Objective-C 5.7%