2020 API AWARDS WINNER - BEST IN MEDIA APIs LEARN MORE

VersionFilter

The VersionFilter model represents a blacklist system management represented by the VersionFilter constructor. It is based on:

  • The manufacturer's ID that will be filtered. A null value indicates that all manufacturers are impacted.
  • The minimal Android API Version on which the filter will be applied. The filters assume that a blacklist starts with a specific Android version (breaking change) and will be applied to all next versions. The default ones set a black screen for a full-screen notification on Android 10. The mustFilter method informs if the filter is applied.

Available in the package com.voxeet.sdk.push.center.management.VersionFilter.

Constructors

VersionFilter

VersionFilter(@Nullable manufacturer: String, minimumAPIVersion: int)

Constructs the given filter.

Parameters

NameTypeDescription
manufacturerStringnullable manufacturer or a null value
minimumAPIVersionintminimal API version

Properties

manufacturer (String)

The manufacturer's identifier used for filtering by the VersionFilter instance.

minimumAPIVersion (int)

Keeps the information about minimal Android API Version used for filtering by the VersionFilter instance.

Methods

mustFilter

mustFilter(@NonNull manufacturer: String, systemAPIVersion: int): boolean

A method called by the SDK to know if a filter is applied. Therefore, it blacklists the current mode to which it is registered to.

This method can be overridden to focus on checking lower versions or exact versions.

Parameters

NameTypeDescription
manufacturerStringnon null manufacturer of the currently used device
systemAPIVersionintthe version of the currently used operating system

Returns: boolean - the true value informs about blacklisted, an unmet value informs that a filter was not applied.