1

Possible Duplicate:
failed binder transaction on widget update

i am having a problem when i try to update a bitmap in my android widget. JAVA FAILED BINDER TRANSACTION error start looping in my logcat after 10 to 12 updates of bitmap and my widget stop updating after that. All i am doing is showing current seconds in my widget at the moment. This is how i am creating a bitmap

public static Bitmap buildUpdate(String time,Context ctx) 
    {
Bitmap myBitmap=null;   
    myBitmap = Bitmap.createBitmap(160, 84, Bitmap.Config.ARGB_4444);
    Canvas myCanvas = new Canvas(myBitmap);
    Paint paint = new Paint();
    Typeface clock = Typeface.createFromAsset(ctx.getAssets(),"AladinRegular.ttf");
    paint.setAntiAlias(true);
    paint.setSubpixelText(true);
    paint.setTypeface(clock);
    paint.setStyle(Paint.Style.FILL);
    paint.setColor(Color.WHITE);
    paint.setTextSize(65);
    paint.setTextAlign(Align.CENTER);
    myCanvas.drawText(time, 80, 60, paint);
    return myBitmap;
    }

and this is where i am calling it to update my imageview

   remoteViews.setImageViewBitmap(R.id.label_fg, Drawing.buildUpdate(seconds+" ",ctxt));

I dont know what i seem to be doing wrong here , all i got after two days of research is that i am hitting IPC memory limit. Why so and how to avoid this ?

Community
  • 1
  • 1
chossen-addict
  • 370
  • 1
  • 7
  • 31

1 Answers1

2

Yes, you're hitting the size limit for bitmaps passed through a binder call. More recent versions of Android use newer mechanisms for this and the limits are higher.

You can avoid the error by using smaller bitmaps. :)

adamp
  • 28,862
  • 9
  • 81
  • 69