blob: 48b765822175ab7f40d0e716c8975196817c33c1 [file] [log] [blame]
package com.airbnb.lottie.network;
import java.io.IOException;
import androidx.annotation.NonNull;
import androidx.annotation.WorkerThread;
/**
* Implement this interface to handle network fetching manually when animations are requested via url. By default, Lottie will use an
* HttpUrlConnection under the hood but this enables you to hook into your own network stack. By default, Lottie will also handle caching the
* animations but if you want to provide your own cache directory, you may implement `LottieNetworkCacheProvider`.
*
* @see com.airbnb.lottie.Lottie#initialize
*/
public interface LottieNetworkFetcher {
@WorkerThread
@NonNull
LottieFetchResult fetchSync(@NonNull String url) throws IOException;
}