createOfflineRegion

Creates an offline region in the database by downloading the resources needed to use the given region offline.

When the initial database queries have completed, the provided callback will be executed on the main thread.

Note that the resulting region will be in an inactive download state; to begin downloading resources, call OfflineRegion.setDownloadState(DownloadState.STATE_ACTIVE), optionally registering an OfflineRegionObserver beforehand.

Parameters

definition

the offline region definition

metadata

the metadata in bytes

callback

the callback to be invoked