Packagecom.tuarua.firebase.ml.common.modeldownload
Classpublic class ModelDownloadConditions
InheritanceModelDownloadConditions Inheritance Object

Configurations for model downloading conditions.



Public Properties
 PropertyDefined By
  canDownloadInBackground : Boolean
[read-only] Indicates whether the model can be downloaded while the app is in the background.
ModelDownloadConditions
  isChargingRequired : Boolean
[read-only] true if charging is required for download.
ModelDownloadConditions
  isDeviceIdleRequired : Boolean
[read-only] true if device idle is required for download.
ModelDownloadConditions
  isWiFiRequired : Boolean
[read-only] Indicates whether Wi-Fi is required for downloading.
ModelDownloadConditions
Public Methods
 MethodDefined By
  
ModelDownloadConditions(isWiFiRequired:Boolean, canDownloadInBackground:Boolean = false, isChargingRequired:Boolean = false, isDeviceIdleRequired:Boolean = false)
Creates an instance of ModelDownloadConditions with the given conditions.
ModelDownloadConditions
Property Detail
canDownloadInBackgroundproperty
canDownloadInBackground:Boolean  [read-only]

Indicates whether the model can be downloaded while the app is in the background. iOS only.

The default value is false.


Implementation
    public function get canDownloadInBackground():Boolean
isChargingRequiredproperty 
isChargingRequired:Boolean  [read-only]

true if charging is required for download. Android N+ only

The default value is false.


Implementation
    public function get isChargingRequired():Boolean
isDeviceIdleRequiredproperty 
isDeviceIdleRequired:Boolean  [read-only]

true if device idle is required for download. Android N+ only

The default value is false.


Implementation
    public function get isDeviceIdleRequired():Boolean
isWiFiRequiredproperty 
isWiFiRequired:Boolean  [read-only]

Indicates whether Wi-Fi is required for downloading.

The default value is false.


Implementation
    public function get isWiFiRequired():Boolean
Constructor Detail
ModelDownloadConditions()Constructor
public function ModelDownloadConditions(isWiFiRequired:Boolean, canDownloadInBackground:Boolean = false, isChargingRequired:Boolean = false, isDeviceIdleRequired:Boolean = false)

Creates an instance of ModelDownloadConditions with the given conditions.

Parameters
isWiFiRequired:Boolean — Whether a device has to be connected to Wi-Fi for downloading to start.
 
canDownloadInBackground:Boolean (default = false) — Whether the model can be downloaded while the app is in the background.
 
isChargingRequired:Boolean (default = false)
 
isDeviceIdleRequired:Boolean (default = false)