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

    Fields
    Modifier and Type
    Field
    Description
    Models returned from calling getModels from the Content API

    Fields inherited from class fi.iki.elonen.NanoHTTPD

    asyncRunner, MIME_HTML, MIME_PLAINTEXT, MIME_TYPES, SOCKET_READ_TIMEOUT
  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Removes all BioDigital Human content from the device
    void
    download(String modelId)
    Download a model
    void
    Download a set of models
    static HKServices
    The Singleton instance of the HKServices class
    void
    Get Models from the Content API - requires API Key and Secret
    Check if a model has already been downloaded
    Get a list of modelID's available on the device for offline use
    void
    Set the current language
    void
    setup(android.content.Context c, HKServicesInterface delegate)
    Initialize BioDigital Services and authenticate the sdk

    Methods 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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • models

      public ArrayList<HKModel> models
      Models returned from calling getModels from the Content API
  • Method Details

    • getInstance

      public static HKServices getInstance()
      The Singleton instance of the HKServices class
      Returns:
      the singleton instance
    • setup

      public void setup(android.content.Context c, HKServicesInterface delegate)
      Initialize BioDigital Services and authenticate the sdk
      Parameters:
      c - your Application context
      delegate - the HKServicesInterface for callback messages
    • getModels

      public void getModels()
      Get Models from the Content API - requires API Key and Secret
    • download

      public void download(String modelId)
      Download a model
      Parameters:
      modelId - String model Id
    • download

      public void download(ArrayList<String> modelIds)
      Download a set of models
      Parameters:
      modelIds - an array of model IDs
    • modelDownloaded

      public Boolean modelDownloaded(String uri)
      Check if a model has already been downloaded
      Parameters:
      uri - the model id
      Returns:
      true/false
    • offlineModelIDs

      public ArrayList<String> offlineModelIDs()
      Get a list of modelID's available on the device for offline use
      Returns:
      list of objectIDs
    • setLanguage

      public void setLanguage(HKLanguage language)
      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