public class CameraintentActivity extends Activity {
String _path, sliderpather;
Button button;
Intent intent;
Uri outputFileUri;
File file;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
button = (Button)findViewById(R.id.button1);
_path = Environment.getExternalStorageDirectory().getName() + File.separatorChar + "make_machine_example.jpg";
file = new File( _path );
outputFileUri = Uri.fromFile( file );
intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE );
intent.putExtra( MediaStore.EXTRA_OUTPUT, outputFileUri );
button.setOnClickListener(
new OnClickListener()
{
public void onClick(View v)
{
startActivityForResult( intent, 0 );
}
}
);
}
}
I want my app so it pulls the camera, takes a picture, and saves the picture into my desired directory but it is not working...
and yes the AndroidManifest.xml contains the following permissions
CAMERA WRITE_INTERNAL_STORAGE WRITE_EXTERNAL_STORAGE