BigImageViewer icon indicating copy to clipboard operation
BigImageViewer copied to clipboard

bigImage.setImageLoaderCallback Not working on Service when app runing on background mod

Open NinhvanLuyen opened this issue 7 years ago • 1 comments

bigImage.setImageLoaderCallback(object : ImageLoader.Callback { override fun onFinish() { Timber.e("Finish") }

        override fun onSuccess(image: File?) {
            Timber.e("onSuccess")
            WallpaperManager.getInstance(applicationContext).setBitmap(ImageUtils.getBitmap(image!!))
        }

        override fun onFail(error: Exception?) {
            error!!.printStackTrace()
        }

        override fun onCacheHit(image: File?) {
            WallpaperManager.getInstance(applicationContext).setBitmap(ImageUtils.getBitmap(image!!))
        }

        override fun onCacheMiss(image: File?) {
        }

        override fun onProgress(progress: Int) {
            Timber.e("progress $progress")
        }

        override fun onStart() {
            Timber.e("onStart")
        }
    })

I have try sometime but this not working ! Please !

NinhvanLuyen avatar Mar 02 '18 10:03 NinhvanLuyen

I've never tested it in Service, could you please do some debug and find out the reason? PR is welcome!

Piasy avatar Mar 02 '18 23:03 Piasy