code: public static OfflineDownloadOptions getOfflineDownloadOptions(final Intent data, byte[] metadata) {
      return OfflineDownloadOptions.builder()
        .definition(getRegionDefinition(data))
        .regionName(getRegionName(data))
        .metadata(metadata)
        .build();
    }
docs: Use this method to take the returning {@link Intent} data and construct a {@link OfflineDownloadOptions}
  instance which can be used for starting a new offline region download.
  
  @param data     the {@link Activity#startActivityForResult(Intent, int)} which this method should
  be used in provides the returning intent which should be provided in this param
  @param metadata Add additional metadata to the {@link OfflineRegionDefinition}, note
  to make sure not to override the region definition name if you still wish to use
  it
  @return a new {@link OfflineDownloadOptions} instance which can be used to launch the download
  service using
  {@link com.mapbox.mapboxsdk.plugins.offline.offline.OfflinePlugin#startDownload(OfflineDownloadOptions)}
  @since 0.1.0