public static interface

Apptimize.MetadataStateChangedListener

com.apptimize.Apptimize.MetadataStateChangedListener

Class Overview

Interface definition for callbacks to be invoked when the Apptimize metadata state has changed. The metadata itself may or may not have changed. These callback methods will always be called on the main thread. When your application moves to the foreground it may trigger metadata to be updated. To ensure that metadata is up-to-date when your application moves to the foreground, you should wait for the `onApptimizeForegrounded` event to fire and check the `willRefreshMetadata` flag. If it is set, you should then wait for an `onMetadataStateChanged` event to fire with the `REFRESHING` flag not present in the `stateFlags` EnumSet. For more information on metadata see the documentation for setUpdateMetadataTimeout(long)

Summary

Public Methods
abstract void onApptimizeForegrounded(boolean willRefreshMetadata)
Called in response to your application moving to the foreground (either because the activity moved to the foreground or because the ApplicationBackgroundManager fired an `onApplicationForegrounded` event).
abstract void onMetadataStateChanged(EnumSet<Apptimize.ApptimizeMetadataStateFlags> stateFlags)
Called when Apptimize metadata state changes.

Public Methods

public abstract void onApptimizeForegrounded (boolean willRefreshMetadata)

Called in response to your application moving to the foreground (either because the activity moved to the foreground or because the ApplicationBackgroundManager fired an `onApplicationForegrounded` event). You may or may not receive this event before your activity/application receives it's notification. The `willRefreshMetadata` argument will be true if metadata is currently refreshing or will imminently refresh. If `willRefreshMetadata` is true, you should wait for `onMetadataStateChanged` to be called and for the `REFRESHING` flag to be removed from the `stateFlags` before running any tests if you wish to ensure that test information is current. NOTE: This method _will not fire_ if Apptimize is disabled by disable().

public abstract void onMetadataStateChanged (EnumSet<Apptimize.ApptimizeMetadataStateFlags> stateFlags)

Called when Apptimize metadata state changes.