SCMEmbedEnvironment

public class SCMEmbedEnvironment extends SCMEnvironment

Most basic implementation of SCMEnvironment, in which the SCM HTTP server is started by the application. This is the standard use case.

Methods

cleanUp

public static void cleanUp()

Cleans up singleton instance of SCMEmbedEnvironment if exists.

This can be called if middleware components are no longer to be used. Be aware that SCMEmbedEnvironment singleton instance will be completely destroyed internally after several minutes ; do not keep any reference to it if this static method is called.

getSCMEmbedEnvironment

public static SCMEmbedEnvironment getSCMEmbedEnvironment(Context context)

Initializes singleton instance of this environment.

This method must be called in Main Thread.

Parameters:
  • context – the application context.
Throws:
  • SCMException – when the SCWS cannot be reached on the device.
Returns:

SCMEmbedEnvironment singleton instance.

getSCMEmbedEnvironment

public static SCMEmbedEnvironment getSCMEmbedEnvironment()

Initializes singleton instance of this environment.

Requires the application to be already set.

Throws:
  • SCMException – when the SCWS cannot be reached on the device.
Returns:

SCMEmbedEnvironment singleton instance.