Device info
Get random user ID
Section titled “Get random user ID”static Future<String> getRandomUserId(); // lib/affise.dart:142Affise.getRandomUserId();Sentinel errors returned as the UUID string:
11111111-1111-1111-1111-111111111111— SDK not initialized (AffiseError.UUID_NOT_INITIALIZED)22222222-2222-2222-2222-222222222222— no valid method (AffiseError.UUID_NO_VALID_METHOD)
Defined in lib/errors/affise_error.dart:1-5:
class AffiseError { static const String UUID_NOT_INITIALIZED = "11111111-1111-1111-1111-111111111111"; static const String UUID_NO_VALID_METHOD = "22222222-2222-2222-2222-222222222222";}Get Affise device ID
Section titled “Get Affise device ID”static Future<String> getRandomDeviceId(); // lib/affise.dart:155Affise.getRandomDeviceId();The same AffiseError sentinel strings are returned on failure.
Get providers
Section titled “Get providers”static Future<Map<ProviderType, dynamic>> getProviders(); // lib/affise.dart:168Affise.getProviders().then((providers) { var key = ProviderType.AFFISE_APP_TOKEN; var value = providers[key];});“Return Empty Map if Affise SDK not initialized”
README 1633
The implementation (lib/native/affise_native.dart:161-173) converts Map<Object?, Object?>? into Map<ProviderType, dynamic> using ProviderType.fromString.
Is first run
Section titled “Is first run”static Future<bool> isFirstRun(); // lib/affise.dart:181Affise.isFirstRun().then((isFirstRun) { // handle});ProviderType categories
Section titled “ProviderType categories”enum ProviderType is declared in lib/parameters/provider_type.dart:3-119; native keys are mapped by ProviderTypeExt at :121-339. The enum has 98 members (the ODM_INFO case was added in 1.7.8), grouped below.
Attribution
Section titled “Attribution”AFFISE_APP_ID, AFFISE_PKG_APP_NAME, AFF_APP_NAME_DASHBOARD, APP_VERSION, APP_VERSION_RAW, STORE, TRACKER_TOKEN, TRACKER_NAME, FIRST_TRACKER_TOKEN, FIRST_TRACKER_NAME, LAST_TRACKER_TOKEN, LAST_TRACKER_NAME, OUTDATED_TRACKER_TOKEN, INSTALLED_TIME, FIRST_OPEN_TIME, INSTALLED_HOUR, FIRST_OPEN_HOUR, INSTALL_FIRST_EVENT, INSTALL_BEGIN_TIME, INSTALL_FINISH_TIME, REFERRER_INSTALL_VERSION, REFERRAL_TIME, REFERRER_CLICK_TIME, REFERRER_CLICK_TIME_SERVER, REFERRER_GOOGLE_PLAY_INSTANT, CREATED_TIME, CREATED_TIME_MILLI, CREATED_TIME_HOUR, UNINSTALL_TIME, REINSTALL_TIME, LAST_SESSION_TIME, CPU_TYPE, HARDWARE_NAME, DEVICE_MANUFACTURER, DEEPLINK_CLICK, DEVICE_ATLAS_ID, AFFISE_DEVICE_ID, AFFISE_ALT_DEVICE_ID, ANDROID_ID, ANDROID_ID_MD5, REFTOKEN, REFTOKENS, REFERRER, REFERRER_UPDATED, USER_AGENT, MCCODE, MNCODE, REGION, COUNTRY, LANGUAGE, DEVICE_NAME, DEVICE_TYPE, OS_NAME, PLATFORM, SDK_PLATFORM, API_LEVEL_OS, AFFISE_SDK_VERSION, OS_VERSION, RANDOM_USER_ID, AFFISE_SDK_POS, TIMEZONE_DEV, AFFISE_EVENT_NAME, AFFISE_EVENT_TOKEN, LAST_TIME_SESSION, TIME_SESSION, AFFISE_SESSION_COUNT, LIFETIME_SESSION_COUNT, AFFISE_DEEPLINK, AFFISE_PART_PARAM_NAME, AFFISE_PART_PARAM_NAME_TOKEN, AFFISE_APP_TOKEN, LABEL, AFFISE_SDK_SECRET_ID, UUID, AFFISE_APP_OPENED, PUSHTOKEN, AFFISE_EVENTS_COUNT, AFFISE_SDK_EVENTS_COUNT, AFFISE_METRICS_EVENTS_COUNT, AFFISE_INTERNAL_EVENTS_COUNT, IS_ROOTED, IS_EMULATOR.
Google (new in 1.7.8)
Section titled “Google (new in 1.7.8)”ODM_INFO → odm_info (lib/parameters/provider_type.dart:99, native key at :310-311). Contributed by the iOS-only Google module from Google’s On-Device Conversion Measurement SDK.
Advertising
Section titled “Advertising”GAID_ADID, GAID_ADID_MD5, OAID, OAID_MD5, ADID, ALTSTR_ADID, FIREOS_ADID, COLOROS_ADID (lib/parameters/provider_type.dart:90-97).
META.
Network
Section titled “Network”MAC_SHA1, MAC_MD5, CONNECTION_TYPE, PROXY_IP_ADDRESS.
NETWORK_TYPE, ISP.
PUSHTOKEN_SERVICE and AD_SERVICE_ATTRIBUTION appear in the README but are not defined in the Dart ProviderType enum (lib/parameters/provider_type.dart) — do not use them in Flutter code. OAID / OAID_MD5 are grouped under the // advertising block in the Dart enum (lib/parameters/provider_type.dart:87-95), not under Huawei as the README suggests.
ProviderType.fromString(String?) is declared at lib/parameters/provider_type.dart:111-114 (and the extension variant at :325-328); it uses firstElementOrNull from lib/utils/list_ext.dart:3-8.