2020-06-10 00:27:52 -07:00
[zcash-android-wallet-sdk ](../../index.md ) / [cash.z.ecc.android.sdk ](../index.md ) / [SdkSynchronizer ](index.md ) / [start ](./start.md )
2019-03-28 23:31:25 -07:00
# start
2020-01-15 05:07:00 -08:00
`fun start(parentScope: CoroutineScope?): ` [`Synchronizer` ](../-synchronizer/index.md )
2019-03-28 23:31:25 -07:00
2020-01-15 05:07:00 -08:00
Starts this synchronizer within the given scope. For simplicity, attempting to start an
2020-06-10 00:08:19 -07:00
instance that has already been started will throw a [SynchronizerException.FalseStart ](../../cash.z.ecc.android.sdk.exception/-synchronizer-exception/-false-start.md )
2020-01-15 05:07:00 -08:00
exception. This reduces the complexity of managing resources that must be recycled. Instead,
each synchronizer is designed to have a long lifespan and should be started from an activity,
application or session.
2019-03-28 23:31:25 -07:00
### Parameters
2020-01-15 05:07:00 -08:00
`parentScope` - the scope to use for this synchronizer, typically something with a
lifecycle such as an Activity for single-activity apps or a logged in user session. This
2020-06-10 00:27:52 -07:00
scope is only used for launching this synchronizer's job as a child. If no scope is provided,
2020-01-15 05:07:00 -08:00
then this synchronizer and all of its coroutines will run until stop is called, which is not
2020-06-09 20:28:21 -07:00
recommended since it can leak resources. That type of behavior is more useful for tests.
2020-06-10 00:27:52 -07:00
**Return**
an instance of this class so that this function can be used fluidly.