Picasso Image Download for Android - Streaming Model

Here is what I did:

  • Created a custom loader ( extends OkHttpDownloader) and assigned it to Picasso.
  • Inside the bootloader, I added an interceptor ( getClient().interceptors().add(new Interceptor() {...})

I launched the Android application in debug mode, I noticed that there are two threads, each of which is called "Picasso -....". When I try to access an image from the Internet, each of these threads calls public Response intercept(Chain chain)my interceptor method , which means that the same request is being processed by a stream of more than one at a time. What is the reason for this?

+4
source share
1

, - , , . . , :

picasso.setIndicatorsEnabled(true); / picasso.setLoggingEnabled(true);

( , ?). - . , . , , . , , ?

0

Source: https://habr.com/ru/post/1626247/


All Articles