v2.7.1
advertising_id
広告IDにアクセスするためのFlutterプラグインです。iOSではASIdentifierManager.advertisingIdentifier、Androidでは広告IDをラップしています。
42いいね 10.5万30日間ダウンロード140Pub ポイント
AndroidiOS
広告IDにアクセスするためのFlutterプラグイン。
以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。
A Flutter plugin to access advertising ID.
Wraps ASIdentifierManager.advertisingIdentifier (on iOS) and advertising ID (on Android).
Run this command
flutter pub add advertising_id
This will add a line like this to your package's pubspec.yaml
dependencies:
....
advertising_id: ^2.7.1
AdvertisingId.idGet advertising ID.
String? advertisingId;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
advertisingId = await AdvertisingId.id(true);
} on PlatformException {
advertisingId = null;
}
AdvertisingId.isLimitAdTrackingEnabledRetrieves whether the user has limit ad tracking enabled or not.
bool? isLimitAdTrackingEnabled;
// Platform messages may fail, so we use a try/catch PlatformException.
try {
isLimitAdTrackingEnabled = await AdvertisingId.isLimitAdTrackingEnabled;
} on PlatformException {
isLimitAdTrackingEnabled = false;
}
依存関係一覧 1 件
{"sdk":"flutter"}用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。
“A repository is the most basic element of GitHub.”
GitHub Docs — About repositories ↗