Increase chunk size to 1MB (#4011)

* Increase chunk size to 1MB

* Increase timeouts

* Add logs

* Enable HTTP logging

* Encode file name

* Update chunk size

* Add toast
This commit is contained in:
Vivek Maskara 2020-11-09 02:41:49 -07:00 committed by GitHub
parent 71d200ee41
commit 6fa8cc627a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 51 additions and 22 deletions

View file

@ -63,10 +63,10 @@ public class NetworkingModule {
HttpLoggingInterceptor httpLoggingInterceptor) {
File dir = new File(context.getCacheDir(), "okHttpCache");
return new OkHttpClient.Builder()
.connectTimeout(60, TimeUnit.SECONDS)
.writeTimeout(60, TimeUnit.SECONDS)
.connectTimeout(120, TimeUnit.SECONDS)
.writeTimeout(120, TimeUnit.SECONDS)
.addInterceptor(httpLoggingInterceptor)
.readTimeout(60, TimeUnit.SECONDS)
.readTimeout(120, TimeUnit.SECONDS)
.cache(new Cache(dir, OK_HTTP_CACHE_SIZE))
.build();
}