java - IMAGE_CAPTURE Intent never returns to onActivityResult(int, int, Intent); -


I start a IMAGE_CAPTURE intent, and my activity's onActivityResult () receive call:

  intent = new intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE, blank); I.putext ("return-data" is true); StartActivityForResult (i, PICK_ICON_FROM_CAMERA_ID);  

But, if I start my intention in this way, the capture image intent was called, but never called onActivityResult () of my activity Gone:

Intent I = New Intent (android.provider.MediaStore.ACTION_IMAGE_CAPTURE, blank); I.putExtra (MediaStore.EXTRA_UUTUTUT, URI.PRSE ("File: /" + "Mattstuff")); I.putExtra ("Output Format", Bitmap Compress Format. PNGN (.)); StartActivityForResult (i, PICK_ICON_FROM_CAMERA_ID);

Can you please tell me how 2 nd case work?

I think the "file: / mytextfile" is a wrong Yuri. Try doing something like this:

  file f = new file (Environment.getExternalStorageDirectory (), "MyTestFile"); Intent.putExtra (MediaStore.EXTRA_OUTPUT, Uri.fromFile (f));  

The actual path would be "/ sdcard / MyTestFile".


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -