-
public final class PassioConfiguration extends BaseConfiguration
A PassioConfiguration object must be constructed to configure the SDK. The configuration process depends on the location of the files needed for the SDK to work. There are three different ways to configure the SDK depending on the attributes of the object.
-
-
Field Summary
Fields Modifier and Type Field Description private BooleansdkDownloadsModelsprivate BooleanallowInternetConnectionprivate BooleanremoteOnlyprivate StringproxyUrlprivate Map<String, String>proxyHeadersprivate StringimageModelprivate StringtextModelprivate Bridgebridgeprivate List<Uri>localFilesprivate IntegerdebugModeprivate final ContextappContextprivate final Stringkey
-
Constructor Summary
Constructors Constructor Description PassioConfiguration(Context appContext, String key)
-
Method Summary
Modifier and Type Method Description final BooleangetSdkDownloadsModels()SDK Downloads Models indicates that the SDK will try to fetch the latest files every 2 weeks. final UnitsetSdkDownloadsModels(Boolean sdkDownloadsModels)SDK Downloads Models indicates that the SDK will try to fetch the latest files every 2 weeks. final BooleangetAllowInternetConnection()final UnitsetAllowInternetConnection(Boolean allowInternetConnection)final BooleangetRemoteOnly()final UnitsetRemoteOnly(Boolean remoteOnly)final StringgetProxyUrl()final UnitsetProxyUrl(String proxyUrl)final Map<String, String>getProxyHeaders()final UnitsetProxyHeaders(Map<String, String> proxyHeaders)final StringgetImageModel()final UnitsetImageModel(String imageModel)final StringgetTextModel()final UnitsetTextModel(String textModel)final BridgegetBridge()final UnitsetBridge(Bridge bridge)final List<Uri>getLocalFiles()This method requires that the correct files were already downloaded and that the Uris for these files are available. final UnitsetLocalFiles(List<Uri> localFiles)This method requires that the correct files were already downloaded and that the Uris for these files are available. final IntegergetDebugMode()Use debugMode = 1 to get more verbose logs. final UnitsetDebugMode(Integer debugMode)Use debugMode = 1 to get more verbose logs. final ContextgetAppContext()final StringgetKey()StringtoString()-
-
Method Detail
-
getSdkDownloadsModels
final Boolean getSdkDownloadsModels()
SDK Downloads Models indicates that the SDK will try to fetch the latest files every 2 weeks. This mode works with the provided customURL or without it. If customURL is not null, the SDK will go to that URL to try to fetch the latest files. Contrastingly, it will go to the BaseUrl (Passio's server) to try to fetch the files. The flow of the configuration process is the same like in the customURL case.
-
setSdkDownloadsModels
final Unit setSdkDownloadsModels(Boolean sdkDownloadsModels)
SDK Downloads Models indicates that the SDK will try to fetch the latest files every 2 weeks. This mode works with the provided customURL or without it. If customURL is not null, the SDK will go to that URL to try to fetch the latest files. Contrastingly, it will go to the BaseUrl (Passio's server) to try to fetch the files. The flow of the configuration process is the same like in the customURL case.
-
getAllowInternetConnection
final Boolean getAllowInternetConnection()
-
setAllowInternetConnection
final Unit setAllowInternetConnection(Boolean allowInternetConnection)
-
getRemoteOnly
final Boolean getRemoteOnly()
-
setRemoteOnly
final Unit setRemoteOnly(Boolean remoteOnly)
-
getProxyUrl
final String getProxyUrl()
-
setProxyUrl
final Unit setProxyUrl(String proxyUrl)
-
getProxyHeaders
final Map<String, String> getProxyHeaders()
-
setProxyHeaders
final Unit setProxyHeaders(Map<String, String> proxyHeaders)
-
getImageModel
final String getImageModel()
-
setImageModel
final Unit setImageModel(String imageModel)
-
getTextModel
final String getTextModel()
-
setTextModel
final Unit setTextModel(String textModel)
-
getLocalFiles
final List<Uri> getLocalFiles()
This method requires that the correct files were already downloaded and that the Uris for these files are available. Providing a list of Uris for the files needed for the SDK to work the SDK will copy them to it's internal directory (using the App's Cache folder). If the configuration process is completed by returning PassioMode.IS_READY_FOR_DETECTION, the files provided in the localFiles property can be deleted from the original location because the SDK will use the copies in the App's Cache folder.
-
setLocalFiles
final Unit setLocalFiles(List<Uri> localFiles)
This method requires that the correct files were already downloaded and that the Uris for these files are available. Providing a list of Uris for the files needed for the SDK to work the SDK will copy them to it's internal directory (using the App's Cache folder). If the configuration process is completed by returning PassioMode.IS_READY_FOR_DETECTION, the files provided in the localFiles property can be deleted from the original location because the SDK will use the copies in the App's Cache folder.
-
getDebugMode
final Integer getDebugMode()
Use debugMode = 1 to get more verbose logs.
-
setDebugMode
final Unit setDebugMode(Integer debugMode)
Use debugMode = 1 to get more verbose logs.
-
getAppContext
final Context getAppContext()
-
-
-
-