LoginSignup
10
8

More than 5 years have passed since last update.

プラットフォーム別 広告 ID の仕様

Posted at

Google Advertising ID

取り方

AdvertisingIdClient | Google APIs for Android | Google Developers

AdvertisingIdClient.Info adInfo = AdvertisingIdClient.getAdvertisingIdInfo(context);
String aaidString = adInfo.getId();

仕様

Format of the Advertising ID - Advertising ID | Android Developers
には

Google Play services APIs expose the user's advertising ID as a string format of UUID

とあり、UUID である事が判る。

Apple Advertising Identifier

取り方

advertisingIdentifier Property - ASIdentifierManager Class Reference

NSUUID *idfa = [ASIdentifierManager sharedManager].advertisingIdentifier;
NSString *idfaString = [idfa UUIDString];

仕様

advertisingIdentifier プロパティが返す NSUUID は、NSUUID Class Reference

UUIDs created by NSUUID conform to RFC 4122 version 4 and are created with random bytes.

とあり、RFC 4122 version 4 に準拠していると明記されている。

Windows Advertising ID

取り方

AdvertisingManager.AdvertisingId | advertisingId Property (Windows)

string advertisingId = Windows.System.UserProfile.AdvertisingManager.AdvertisingId;

仕様

(公開されているもの)は無い。ひどい。

advertisingid lenght - Msdn forums - Tools for Windows Store apps (archived)
現状 32文字の文字列が取得できるが、その文字数という保証はない。

おわりに

いい加減各方面の Advertising ID の頭字語を iAB あたりが決めてくれないかな。

10
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
10
8