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
FieldsModifier and TypeFieldDescriptionModels returned from calling getModels from the Content APIFields inherited from class fi.iki.elonen.NanoHTTPD
asyncRunner, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, SOCKET_READ_TIMEOUT
-
Method Summary
Modifier and TypeMethodDescriptionlong
Removes all BioDigital Human content from the devicevoid
Download a modelvoid
Download a set of modelsstatic HKServices
The Singleton instance of the HKServices classvoid
Get Models from the Content API - requires API Key and SecretmodelDownloaded
(String uri) Check if a model has already been downloadedGet a list of modelID's available on the device for offline usevoid
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
Download a model- Parameters:
modelId
- String model Id
-
download
Download a set of models- Parameters:
modelIds
- an array of model IDs
-
modelDownloaded
Check if a model has already been downloaded- Parameters:
uri
- the model id- Returns:
- true/false
-
offlineModelIDs
Get a list of modelID's available on the device for offline use- Returns:
- list of objectIDs
-
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
-