Package com.biodigital.humansdk
Class HKServices
java.lang.Object
fi.iki.elonen.NanoHTTPD
com.biodigital.humansdk.HKServices
public class HKServices
extends fi.iki.elonen.NanoHTTPD
BioDigital Backend Services for SDK Validation, Analytics, and Content API
-
Nested Class Summary
Nested classes/interfaces inherited from class fi.iki.elonen.NanoHTTPD
fi.iki.elonen.NanoHTTPD.AsyncRunner, fi.iki.elonen.NanoHTTPD.ClientHandler, fi.iki.elonen.NanoHTTPD.ContentType, fi.iki.elonen.NanoHTTPD.Cookie, fi.iki.elonen.NanoHTTPD.CookieHandler, fi.iki.elonen.NanoHTTPD.DefaultAsyncRunner, fi.iki.elonen.NanoHTTPD.DefaultServerSocketFactory, fi.iki.elonen.NanoHTTPD.DefaultTempFile, fi.iki.elonen.NanoHTTPD.DefaultTempFileManager, fi.iki.elonen.NanoHTTPD.HTTPSession, fi.iki.elonen.NanoHTTPD.IHTTPSession, fi.iki.elonen.NanoHTTPD.Method, fi.iki.elonen.NanoHTTPD.Response, fi.iki.elonen.NanoHTTPD.ResponseException, fi.iki.elonen.NanoHTTPD.SecureServerSocketFactory, fi.iki.elonen.NanoHTTPD.ServerRunnable, fi.iki.elonen.NanoHTTPD.ServerSocketFactory, fi.iki.elonen.NanoHTTPD.TempFile, fi.iki.elonen.NanoHTTPD.TempFileManager, fi.iki.elonen.NanoHTTPD.TempFileManagerFactory
-
Field Summary
-
Method Summary
Modifier and Type Method Description long
deleteLocalContent()
Removes all BioDigital Human content from the devicevoid
download(java.lang.String modelId)
Download a modelvoid
download(java.util.ArrayList<java.lang.String> modelIds)
Download a set of modelsstatic HKServices
getInstance()
The Singleton instance of the HKServices classvoid
getModels()
Get Models from the Content API - requires API Key and Secretjava.lang.Boolean
modelDownloaded(java.lang.String uri)
Check if a model has already been downloadedvoid
setLanguage(HKLanguage language)
Set the current languagevoid
setup(android.content.Context c, HKServicesInterface delegate)
Initialize BioDigital Services and authenticate the SDKMethods inherited from class fi.iki.elonen.NanoHTTPD
closeAllConnections, createClientHandler, createServerRunnable, decodeParameters, decodeParameters, decodePercent, getHostname, getListeningPort, getMimeTypeForFile, getServerSocketFactory, getTempFileManagerFactory, isAlive, makeSecure, makeSSLSocketFactory, makeSSLSocketFactory, makeSSLSocketFactory, mimeTypes, newChunkedResponse, newFixedLengthResponse, newFixedLengthResponse, newFixedLengthResponse, serve, setAsyncRunner, setServerSocketFactory, setTempFileManagerFactory, start, start, start, stop, useGzipWhenAccepted, wasStarted
-
Field Details
-
models
Models returned from calling getModels from the Content API
-
-
Method Details
-
getInstance
The Singleton instance of the HKServices class- Returns:
- the singleton instance
-
setup
Initialize BioDigital Services and authenticate the SDK- Parameters:
c
- your Application contextdelegate
- the HKServicesInterface for callback messages
-
getModels
public void getModels()Get Models from the Content API - requires API Key and Secret -
download
public void download(java.lang.String modelId)Download a model- Parameters:
modelId
- String model Id
-
download
public void download(java.util.ArrayList<java.lang.String> modelIds)Download a set of models- Parameters:
modelIds
- an array of model IDs
-
modelDownloaded
public java.lang.Boolean modelDownloaded(java.lang.String uri)Check if a model has already been downloaded- Parameters:
uri
- the model id- Returns:
- true/false
-
setLanguage
Set the current language- Parameters:
language
- an HKLanguage object to translate available text in the 3D scenes
-
deleteLocalContent
public long deleteLocalContent()Removes all BioDigital Human content from the device- Returns:
- the number of deleted files
-