Skip to content

Hardware module

Collects device and hardware values for the providers map (Affise.getProviders()). The Flutter README has no prose section for it; it appears only in the native module tables (README 372, 416).

ProviderType values moved to Hardware in native 1.7.18:

  • Android (affise-mmp-sdk-android/CHANGELOG.md:15-33): USER_AGENT, CPU_TYPE, CPU_CORES, DEVICE, BUILD, DEVICE_NAME, SCREEN_WIDTH, SCREEN_HEIGHT, DENSITY, HARDWARE_NAME, DEVICE_TYPE, OS_VERSION, OS_AND_VERSION, MCCODE, MNCODE, TIMEZONE_DEV, LANGUAGE, COUNTRY, REGION.
  • iOS (affise-mmp-sdk-ios/CHANGELOG.md:17-41): the same set plus PROXY_IP_ADDRESS, ISP, NETWORK_TYPE, CONNECTION_TYPE, DEVICE_MANUFACTURER, OS_NAME.

DEVICE, BUILD and OS_AND_VERSION are not members of the Dart ProviderType enum. See Device info → ProviderType categories.

Add the native module to android/app/build.gradle (README 392):

final affise_version = '1.7.18'
dependencies {
implementation "com.affise:module-hardware:$affise_version"
}

See the Android and iOS Hardware module pages for native details.