lundi 4 mai 2015

Android Photo Intent null

sorry to ask this question, but i cant find the answer anymore.

I am trying to take a Picture on Api Level 18 (Android 4.3) with the following Code:

    Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);

        if (takePictureIntent.resolveActivity(getPackageManager()) != null) {

            startActivityForResult(takePictureIntent, 1);

    }


    if (requestCode == 1 && resultCode == RESULT_OK) {{

            Bundle extras = data.getExtras();

         imageBitmap = (Bitmap) extras.get("data");

    }

The solution i need is the if clause for the api level and the two different intent calls.

I hope you can help me, and sorry for the bad english :D

Aucun commentaire:

Enregistrer un commentaire