Skip to content

ApplicationInformation

Name, version and install information about the app collecting the data.

Collected by ApplicationProbe for the DeviceSamplingPackage.APPLICATION_INFORMATION measure.

Uses the same data structure as the package_info_plus package.

Inheritance
Annotations

Constructors

ApplicationInformation.fromJson

ApplicationInformation.fromJson(
  1. Map<String, dynamic> json
)

ApplicationInformation.fromPackageInfo

ApplicationInformation.fromPackageInfo(
  1. PackageInfo info
)

Creates an ApplicationInformation from the package_info_plus info.

ApplicationInformation

ApplicationInformation({
  1. required String appName,
  2. required String packageName,
  3. required String version,
  4. required String buildNumber,
  5. String buildSignature = '',
  6. String? installerStore,
  7. DateTime? installTime,
  8. DateTime? updateTime,
})

Properties

appName

String appName
final

The app name.

  • CFBundleDisplayName on iOS - falls back to CFBundleName. Defined in the info.plist and/or product target in xcode.
  • application/label on Android. Defined in AndroidManifest.xml or String resources.

buildNumber

String buildNumber
final

The build number. Generated from the version in pubspec.yaml.

  • CFBundleVersion on iOS.
  • versionCode on Android.

Note, on iOS if an app has no buildNumber specified this property will return version. Docs about CFBundleVersion: https://developer.apple.com/documentation/bundleresources/information_property_list/cfbundleversion

buildSignature

String buildSignature
final

The build signature. SHA-256 signing key signature (hex) on Android. Empty string on iOS.

fromJsonFunction

Function get fromJsonFunction
override

The function which can convert a JSON string to an object of this type.

installTime

DateTime? installTime
final

The time when the application was installed.

  • On Android, returns PackageManager.firstInstallTime
  • On iOS, return the creation date of the app default NSDocumentDirectory

installerStore

String? installerStore
final

The installer store. Indicates through which store this application was installed.

packageName

String packageName
final

The package name.

  • bundleIdentifier on iOS and macOS. Defined in the product target in xcode.
  • packageName on Android. Defined in build.gradle as applicationId.

updateTime

DateTime? updateTime
final

The time when the application was last updated.

  • On Android, returns PackageManager.lastUpdateTime
  • On iOS return the last modified date of the app main bundle

version

String version
final

The package version. Generated from the version in pubspec.yaml.

  • CFBundleShortVersionString on iOS.
  • versionName on Android.

Methods

equivalentTo

bool equivalentTo(
  1. Data other
)
override

Returns true if the appName is equal.

toJson

Map<String, dynamic> toJson()
override

Return a JSON encoding of this object.