Carregar imagem num editor de imagem

  • Respostas:0
Claudio Moraes (Claucometa)
  • Posts no fórum: 1

21/12/2017, 19:05:30 via Web

Tenho o seguinte código:

    File file = getApplicationContext().getFileStreamPath(imageName);
    Uri uri = Uri.parse("file:/" + file.getPath());
    showPhoto(uri);

    private void showPhoto(Uri photoUri){
        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setDataAndType(photoUri, "image/*");
        startActivity(intent);
    }

O problema é que o caminho da imagem nunca bate com o caminho certo.

Responder