0

first of all sorry.. but i cant answer in Android take screen shot programmatically cause dont have enought reputation.

The code works fine! thanks.. but.. when i take the screenshot.. the file is stored in the root folder

String extr = Environment.getExternalStorageDirectory().toString();
File myPath = new File(extr, getString(R.string.tituloAplicacion)+".jpg");

but also appears in the Camera DCM folder with another name, its possible avoid that?

Thanks

Community
  • 1
  • 1
Peter
  • 21
  • 1
  • 4
  • hide the file, see if that works. – Rachit Mishra Sep 10 '13 at 11:23
  • Why do you want to answer !!! :) – Tofeeq Ahmad Sep 10 '13 at 11:30
  • ups..I am sorry the answer I wanted to add was that question: ( no way to avoid generating the file in the folder of the camera DCM? Why is generated there? twntee hide the file on the SD or the DCM folder? how do i make that? – Peter Sep 10 '13 at 11:54
  • well i try put a "." before the name of the file.. the problem is that in the moment of take the screenshot with that code the file not appears in the gallery, but when i reboot the phone or execute SDRESCAN, in the phone appears my file in SD and the file with another name in the DCM folder Camera :/. The file in the SD it will be delete after send it to email, but the other.. – Peter Sep 10 '13 at 12:21
  • i found it :) use: "MediaStore.Images.Media.insertImage(null, b, "Screen", "screen");" without getContentResolver() and the thumbnail not its created in the DCM folder. Hope this help anybody. – Peter Sep 10 '13 at 12:45
  • i found it 2.0 :) change the getcontentresolver for null.. make a error in the logcat "Failed to insert image". finally.. delete the line MediaStore.Images.Media.insertImage and it works as i need it. Dont know exactly which is used MediaStore.Images.Media.insertImage – Peter Sep 10 '13 at 13:16

0 Answers0