title: javabinder , FAILED BINDER TRANSACTION - setImageViewBitmap(..)
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/7888890/failed-binder-transaction-on-widget-update">failed binder transaction on widget update</a>  </p>
  </blockquote>
  
  
  
  <h2>Whenever I update my widget Imageview using the bitmap, the Logcat shows the following error,</h2>
  
  <h2>"Javabinder , FAILED  BINDER TRANSACTION"</h2>
  
  <p>I searched in the internet and understood that it is due to memory issue. </p>
  
  <p>I am using the following code to update the ImageView. </p>
  
  <pre><code>private void update(Context context) {
      Log.d("Configure", "updatestart");
      remoteViews.setImageViewBitmap(R.id.clockview,
              buildUpdate("CURRENTTIME", c));
      awm.updateAppWidget(awID, remoteViews);
  }
  </code></pre>
  
  <p>And the buildUpdate function:</p>
  
  <pre><code>public Bitmap buildUpdate(String time, Context context) {
  
  
      Log.d("ConfigureApp","Buildupdate_fn ---" + "start");
      date = new Date();
      sec = (float) date.getSeconds();
      min = (float) date.getMinutes();
      hour = (float) date.getHours() + min / 60.0f;
  
      bitmap = Bitmap.createBitmap(200, 200, Config.ARGB_8888);
      Canvas canvas = new Canvas(bitmap);
      Paint p = new Paint();
      p.setAntiAlias(true);
      p.setColor(0xFFFF0000);
      p.setStrokeWidth(2);
      canvas.drawLine(
              x,
              y,
              (float) (x + (r - 15)
                      * Math.cos(Math
                              .toRadians((hour / 12.0f * 360.0f) - 90f))),
              (float) (y + (r - 10)
                      * Math.sin(Math
                              .toRadians((hour / 12.0f * 360.0f) - 90f))), p);
      canvas.save();
      p.setColor(0xFF0000FF);
      canvas.drawLine(
              x,
              y,
              (float) (x + r
                      * Math.cos(Math.toRadians((min / 60.0f * 360.0f) - 90f))),
              (float) (y + r
                      * Math.sin(Math.toRadians((min / 60.0f * 360.0f) - 90f))),
              p);
      canvas.save();
      p.setColor(0xFFA2BC13);
      canvas.drawLine(
              x,
              y,
              (float) (x + (r + 10)
                      * Math.cos(Math.toRadians((sec / 60.0f * 360.0f) - 90f))),
              (float) (y + (r + 15)
                      * Math.sin(Math.toRadians((sec / 60.0f * 360.0f) - 90f))),
              p);
  
      remoteViews.setTextViewText(R.id.mycity, Float.toString(x));
      return bitmap;
  }
  </code></pre>
  
  <p>Please tell me how to avoid this error.:( Is there any other way to do the same?</p>
  
  <p>Thanks in advance,</p>