Skip to content

Conversation

@bc-lee
Copy link

@bc-lee bc-lee commented Aug 5, 2025

This commit introduces an ImageLoader interface and LineSdkImageConfig to allow apps to provide their own image loading implementation.

A DefaultImageLoader is provided as a basic, yet efficient, implementation with the following characteristics:

  • Caches bitmaps in memory using LruCache to reduce network requests and improve UI responsiveness.
  • Safely handles ImageView references within coroutines using WeakReference to prevent potential memory leaks.
  • Decodes image dimensions efficiently using inJustDecodeBounds before loading the full image into memory.

The SDK no longer uses Picasso directly, and the dependency has been removed. Advanced image loading features can be implemented by creating a custom ImageLoader with libraries like Glide or Coil.

Dialogs now use LineSdkImageConfig.getImageLoader() to load images.

Fixes #163.

This commit introduces an `ImageLoader` interface and
`LineSdkImageConfig` to allow apps to provide their own image loading
implementation.

A `DefaultImageLoader` is provided as a basic, yet efficient,
implementation with the following characteristics:

- Caches bitmaps in memory using `LruCache` to reduce network
  requests and improve UI responsiveness.
- Safely handles `ImageView` references within coroutines using
  `WeakReference` to prevent potential memory leaks.
- Decodes image dimensions efficiently using `inJustDecodeBounds`
  before loading the full image into memory.

The SDK no longer uses Picasso directly, and the dependency has been
removed. Advanced image loading features can be implemented by creating
a custom `ImageLoader` with libraries like Glide or Coil.

Dialogs now use `LineSdkImageConfig.getImageLoader()` to load images.
@CLAassistant
Copy link

CLAassistant commented Aug 5, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Is Picasso absolutely needed for Line SDK?

2 participants