-1
Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(intent,TAKE_PHOTO_WITH_DATA);

Hi all,I got two questions.
the code above show an "TAKE_PHOTO_WITH_DATA cannot be resolved to a variable" error,
I use sdk 2.2.3 but change to 4.2.2 the error still there,
what's wrong with "TAKE_PHOTO_WITH_DATA"?
by the way,
Is there any "TAKE_VIDEO_WITH_DATA" or "TAKE_SOUND_WITH_DATA" can use?
thanks a lot.

franzhong
  • 15
  • 3

1 Answers1

0

It will show an error as long as you don't declare the particular variable,TAKE_PHOTO_WITH_DATA is nothing but a request code,you can even use an integer directly instead of this like startActivityForResult(intent,1); it is just for checking the results you can read more about request codes in the android developer site

insomniac
  • 11,146
  • 6
  • 44
  • 55