Code example for Context

Methods: getApplicationContext

0
                // picture for this profile; we'll set it to the actual picture URL when complete. 
                imageView.setTag(profileId);
                imageView.setImageResource(getDefaultPicture());
            } 
 
            ImageRequest.Builder builder = new ImageRequest.Builder(context.getApplicationContext(), pictureURL)
                    .setCallerTag(this)
                    .setCallback( 
                            new ImageRequest.Callback() { 
                                @Override 
                                public void onCompleted(ImageResponse response) {
                                    processImageResponse(response, profileId, imageView);
                                } 
                            }); 
 
            ImageRequest newRequest = builder.build();
            pendingRequests.put(profileId, newRequest);
 
            ImageDownloader.downloadAsync(newRequest);
        } 
    }