I have a problem with the application it opens the camera but it does not upload aguem can see where I'm going wrong
follow the code
public class MainActivity extends Activity{
//chamar quando a atividade é a primeira criada
@Override
public void onCreate(Bundle savedIntanceState){
super.onCreate(savedIntanceState);
setContentView(R.layout.activity_main);
Button foto = (Button) findViewById(R.id.buttonToFoto);
Button video = (Button) findViewById(R.id.buttonToVideo);
foto.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivity(intent);
String arquivo = Environment.getExternalStorageDirectory() + "/" + System.currentTimeMillis() + ".jpg";
File file = new File(arquivo);
Uri outputFileUri = Uri.fromFile(file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
}
});
video.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent (MediaStore.ACTION_VIDEO_CAPTURE);
startActivity(intent);
String arquivo = Environment.getExternalStorageDirectory() + "/" + System.currentTimeMillis();
File file = new File(arquivo);
Uri outputFileUri = Uri.fromFile(file);
intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);
}
});
}
}