Kit

public abstract class Kit extends Object
implements Comparable<Kit>
Known Direct Subclasses

The base class to extend from for classes needing initialization with with(android.content.Context, Kit[])

Public Constructor Summary

Kit()

Public Method Summary

int
compareTo(Kit another)
Compares Kit's using Dependency
Context
Fabric
abstract String
getIdentifier()
Must be implemented by Kit to allow plugin on-boarding
String
abstract String

Protected Method Summary

abstract Result
doInBackground()
For heavy work to be done in initialization process on a background thread.
Collection<Task>
IdManager
void
onCancelled(Result result)
Called after doInBackground() is cancelled on the UI thread
void
onPostExecute(Result result)
Called after doInBackground() completes on the UI thread
boolean
onPreExecute()
Called before initialization on the UI thread

Inherited Method Summary

Public Constructors

public Kit ()

Public Methods

public int compareTo (Kit another)

Compares Kit's using Dependency

Parameters
another

public Context getContext ()

Returns

public Fabric getFabric ()

Returns

public abstract String getIdentifier ()

Must be implemented by Kit to allow plugin on-boarding

Returns
  • unique identifier

public String getPath ()

Returns
  • relative path for Kit

public abstract String getVersion ()

Returns
  • Kit Version

Protected Methods

protected abstract Result doInBackground ()

For heavy work to be done in initialization process on a background thread. The thread is run on the ExecutorService

protected Collection<Task> getDependencies ()

protected IdManager getIdManager ()

Returns
  • the IdManager provided for use by this Kit

protected void onCancelled (Result result)

Called after doInBackground() is cancelled on the UI thread

protected void onPostExecute (Result result)

Called after doInBackground() completes on the UI thread

protected boolean onPreExecute ()

Called before initialization on the UI thread

Throws
UnmetDependencyException if there's a missing dependency that causes kit to fail initialization.