public abstract class KitIntegration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
KitIntegration.ActivityListener
Kits should implement this interface when they require Activity callbacks for any reason.
|
static interface |
KitIntegration.AttributeListener
Kits should implement this interface when their underlying service has the notion
of a user with attributes.
|
static interface |
KitIntegration.CommerceListener
Kits should implement this interface in order to listen for eCommerce events
|
static interface |
KitIntegration.EventListener
Kits should implement this listener to ensure they receive events as they are
sent into the mParticle SDK.
|
static interface |
KitIntegration.PushListener
Kits should implement this interface when they have Google Cloud Messaging/push features.
|
Constructor and Description |
---|
KitIntegration() |
Modifier and Type | Method and Description |
---|---|
void |
checkForDeepLink() |
protected void |
clearIntegrationAttributes()
Remove all integration attributes set for this integration.
|
KitConfiguration |
getConfiguration()
Get the configuration of the Kit.
|
android.content.Context |
getContext()
Get an application Context object.
|
java.lang.ref.WeakReference<android.app.Activity> |
getCurrentActivity()
Get a WeakReference to an Activity.
|
java.lang.Object |
getInstance()
Kits should override this method in order to provide implementing developers
direct access to their APIs.
|
protected java.util.Map<java.lang.String,java.lang.String> |
getIntegrationAttributes()
Get integration attributes.
|
protected KitManagerImpl |
getKitManager() |
abstract java.lang.String |
getName()
Kits must override this an provide a human-readable name of their service.
|
java.util.Map<java.lang.String,java.lang.String> |
getSettings()
Retrieve the settings that are configured for this Kit, such as API key, etc
|
protected boolean |
isBackgrounded()
Determine if the application is currently in the background.
|
boolean |
isDisabled() |
protected abstract java.util.List<ReportingMessage> |
onKitCreate(java.util.Map<java.lang.String,java.lang.String> settings,
android.content.Context context)
Kits must override this method and should use it for initialization.
|
protected void |
onKitDestroy()
This method will be called when an integration has been disabled.
|
KitIntegration |
setConfiguration(KitConfiguration configuration) |
void |
setInstallReferrer(android.content.Intent intent)
Implement this method to receive com.android.vending.INSTALL_REFERRER Intents that
have been captured by the mParticle SDK.
|
protected void |
setIntegrationAttributes(java.util.Map<java.lang.String,java.lang.String> integrationAttributes)
Set integration attributes.
|
KitIntegration |
setKitManager(KitManagerImpl kitManager) |
void |
setLocation(android.location.Location location)
The mParticle SDK is able to track a user's location based on provider and accuracy settings, and additionally allows
developers to manually set a location.
|
abstract java.util.List<ReportingMessage> |
setOptOut(boolean optedOut) |
protected final boolean isBackgrounded()
public final android.content.Context getContext()
public final java.lang.ref.WeakReference<android.app.Activity> getCurrentActivity()
public KitConfiguration getConfiguration()
getSettings()
.public final KitIntegration setConfiguration(KitConfiguration configuration)
public java.lang.Object getInstance()
public boolean isDisabled()
public abstract java.lang.String getName()
protected abstract java.util.List<ReportingMessage> onKitCreate(java.util.Map<java.lang.String,java.lang.String> settings, android.content.Context context)
settings
- the settings that have been configured in mParticle UI. Use this to extract your API key, etccontext
- an Application Context objectprotected void onKitDestroy()
public void setLocation(android.location.Location location)
location
- public final java.util.Map<java.lang.String,java.lang.String> getSettings()
public abstract java.util.List<ReportingMessage> setOptOut(boolean optedOut)
optedOut
- protected final KitManagerImpl getKitManager()
public final KitIntegration setKitManager(KitManagerImpl kitManager)
public void checkForDeepLink()
protected final void setIntegrationAttributes(java.util.Map<java.lang.String,java.lang.String> integrationAttributes)
integrationAttributes
- protected final java.util.Map<java.lang.String,java.lang.String> getIntegrationAttributes()
protected final void clearIntegrationAttributes()
public void setInstallReferrer(android.content.Intent intent)
intent
- an intent with the INSTALL_REFERRER action