broadcast New Picture - Android android.graphics

Android examples for android.graphics:Picture

Description

broadcast New Picture

Demo Code

import android.content.Context;
import android.content.Intent;
import android.net.Uri;

public class Main {

  public static final String ACTION_NEW_PICTURE = "android.hardware.action.NEW_PICTURE";

  public static void broadcastNewPicture(Context context, Uri uri) {
    context.sendBroadcast(new Intent(ACTION_NEW_PICTURE, uri));
    // Keep compatibility
    context.sendBroadcast(new Intent("com.android.camera.NEW_PICTURE", uri));
  }//w  w w  .j  av a2 s.  co  m

}

Related Tutorials