playPORTAL Manager

The playPORTAL Manager (PPManager) Class is used to access all playPORTAL services through the SDK.

Methods

getInstance

public static PPManager getInstance( ) -> PPManager

Retrieve a reference to the playPORTAL Manager singleton. The method is idempotent.

All access to the playPORTAL services are thru the singleton, and getInstance can be called when needed.

Parameter

Type

Description

returns

PPManager

Singleton instance of playPORTAL Manager

setContextAndActivity

public void setContextAndActivity(c, a)

Sets the application context and the activity context.

Parameter

Type

Description

c

Context

Context of this application.

a

Activity

Activity (e.g. your login activity)

returns

Void

addAuthListener

public void addAuthListener((Boolean isAuthd))

The user must provide a method that the SDK can invoke on authentication state changes. This method takes a single Boolean parameter to indicate auth state.

Parameter

Type

Description

function

takes a single Boolean

Function that is invoked on authentication state changes.

returns

Void

configure

public void configure(String CLIENT_ID, String CLIENT_SECRET, String REDIRECT_URL, String env, String appName, _CallbackFunction._Generic cb)

Configure the SDK for use.

Parameter

Type

Description

CLIENT_ID

String

Client Id for this app (gotten from playPORTAL website)

CLIENT_SECRET

String

Client secret for this app (gotten from playPORTAL website)

REDIRECT_URL

String

URI in the app to redirect to on successful SSO login

env

String

Runtime environment either "SANDBOX" or "PRODUCTION"

appName

String

Your app name

cb

_CallbackFunction._Generic

Callback invoked after configuration providing status of success or failure.

returns

Void