Right now i'm getting an FC because when I try to get the URI from the image there is a nullPointerException
Any suggestions on what i'm doing wrong? FYI - I'm kinda a nooblet
This is where I'm launching the camera
Using java Syntax Highlighting
- String fileName = "temp.jpg";
- ContentValues values = new ContentValues();
- values.put(MediaStore.Images.Media.TITLE, fileName);
- Uri mCapturedImageURI = getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);
- Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
- intent.putExtra(MediaStore.EXTRA_OUTPUT, mCapturedImageURI);
- startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);
Parsed in 0.011 seconds, using GeSHi 1.0.8.4
Dealing With Pic
Using java Syntax Highlighting
- protected void onActivityResult(int requestCode, int resultCode, Intent data)
- {
- //ERROR IS HERE
- Uri takenImage = data.getData();
- String[] projection = { MediaStore.Images.Media.DATA};
- Cursor cursor = managedQuery(takenImage, projection, null, null, null);
- int column_index_data = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
- cursor.moveToFirst();
- String img_path = cursor.getString(column_index_data);
- Intent handleNewPic = new Intent(takePic.this, HandlePic.class);
- Bundle bundle = new Bundle();
- bundle.putString("picturePath", img_path);
- handleNewPic.putExtras(bundle);
- startActivity(handleNewPic);
- }
Parsed in 0.011 seconds, using GeSHi 1.0.8.4