GlobalActivityStarter

This is the Activity Starter. Use this type to start Activities or get their start intent.

Activities to launch are identified by their input ActivityParams.

data class ExampleActivityParams(...) : ActivityParams

globalActivityStarter.start(context, ExampleActivityParams(...))

Types

Link copied to clipboard

This is a marker class Mark all data classes related to activity arguments with this type

Link copied to clipboard
data class DeeplinkActivityParams(val screenName: String, val jsonArguments: String = "")

Class that represents the parameters to start an activity using a deeplink.

Link copied to clipboard

Implement this mapper that will return Activity class for the given parameters. Once implemented it, you need to contribute it as a multibinding using ContributesMultibinding into the AppScope.

Functions

Link copied to clipboard
abstract fun start(context: Context, params: GlobalActivityStarter.ActivityParams, options: Bundle? = null)

Starts the activity given its params.

abstract fun start(context: Context, deeplinkActivityParams: GlobalActivityStarter.DeeplinkActivityParams, options: Bundle? = null)

Starts the activity given deeplinkActivityParams.

Link copied to clipboard

Returns the Intent that can be used to start the Activity, given the ActivityParams. This method will generally be used to start the activity for result.

abstract fun startIntent(context: Context, deeplinkActivityParams: GlobalActivityStarter.DeeplinkActivityParams): Intent?

Returns the Intent that can be used to start the Activity, given the DeeplinkActivityParams. deeplinkActivityParams will be mapped into ActivityParams using the ParamToActivityMapper, which will be added into the Intent to start the activity.