Skip to content

Hardware module

Enum: AffiseModules.Hardware (Runtime/Modules/AffiseModules.cs:24). The PascalCase wire name "Hardware" is returned by AffiseModules.Module() (Runtime/Modules/AffiseModules.cs:48).

Collects device and hardware identifiers. In 1.7.18 these 19 providers moved from the core SDK into this module (CHANGELOG.md:15-33).

  • Available on Android and iOS.
  • Android: native package com.affise:module-hardware (README Android modules table README.md:283, gradle README.md:304).
  • iOS: CocoaPods subspec AffiseModule/Hardware (README iOS modules table README.md:332, Podfile README.md:352).
  • Enabled by default on both platforms in the editor dependency settings (Editor/Resources/AffiseModules.json:64-80, enabled: true for Android and iOS, version 1.7.18). Per the README, modules are updated automatically on build and need no manual editing.
internal sealed class HardwareModule : AffiseModule

Namespace: AffiseAttributionLib.Module.Hardware. Declared at Runtime/Module/Hardware/HardwareModule.cs:10. The class is internal. There’s no Affise.Module.Hardware API: the module has no public methods. You can reference it only through the AffiseModules.Hardware enum, for example in SetDisableModules(...) or Affise.Module.GetStatus(...).

Affise.Module.GetStatus(AffiseModules.Hardware, response => {
// handle response
});

From README §Hardware (README.md:866-886):

  • 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

The same list is registered in HardwareModule.Start() (Runtime/Module/Hardware/HardwareModule.cs:22-43). See Device info for the full provider map.