Klasse FeatureValidator

java.lang.Object
com.blukii.sdk.common.FeatureValidator

public final class FeatureValidator extends Object
Helper class to validate application and mobile device features.
  • Konstruktordetails

    • FeatureValidator

      public FeatureValidator(@NonNull android.content.Context context)
      Constructor
      Parameter:
      context - a valid context that must not be null
  • Methodendetails

    • isAppOnForeground

      public boolean isAppOnForeground()
      Checks if the App is on foreground.
      Gibt zurück:
      true if App is on foreground
    • isScreenOn

      public boolean isScreenOn()
      Checks if the device screen is interactive.

      Note: if the device is on lock screen this function will return false

      Gibt zurück:
      true if Screen is interactive
    • isConnectedToInternet

      @RequiresPermission("android.permission.ACCESS_NETWORK_STATE") public boolean isConnectedToInternet()
      Checks if the device is connected to the internet.
      Gibt zurück:
      true if connected to the internet
    • hasNetworkConnection

      @RequiresPermission("android.permission.ACCESS_NETWORK_STATE") public boolean hasNetworkConnection()
      Checks if the device is connected to any (public or local) Network.
      Gibt zurück:
      true if connected to any Network
    • bluetoothIsEnabled

      @RequiresPermission("android.permission.BLUETOOTH") public boolean bluetoothIsEnabled()
      Checks if Bluetooth is enabled on the device.

      Note: Requires Manifest.permission.BLUETOOTH permission.

      Gibt zurück:
      true if Bluetooth is enabled
    • locationIsEnabled

      @RequiresPermission("android.permission.ACCESS_FINE_LOCATION") public boolean locationIsEnabled()
      Checks if Location is enabled on the device.

      Note: Requires Manifest.permission.ACCESS_FINE_LOCATION permission.

      Gibt zurück:
      true if Location is enabled