Skip to content

Error if using inside FirebaseMessagingService #2351

@patelakshay13890

Description

@patelakshay13890

I want to load Image from URL into Notification Style as BigPictureStyle.
I am getting error while using

java.lang.IllegalStateException: Method call should happen from the main thread.

And Code I'm using is

Picasso.get().load(imageUri)
.into(new Target() {
@OverRide
public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) {
notifyBitmap = bitmap;
}

                        @Override
                        public void onBitmapFailed(Exception e, Drawable errorDrawable) {
                        }

                        @Override
                        public void onPrepareLoad(Drawable placeHolderDrawable) {
                        }
                    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions