Advertisement
Guest User

Untitled

a guest
Jul 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2014 Valerio Bozzolan
  3. *
  4. * This program is free software: you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License as published by
  6. * the Free Software Foundation, either version 3 of the License, or
  7. * (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  16. */
  17.  
  18. package anupam.acrylic;
  19.  
  20. import java.io.File;
  21. import java.io.IOException;
  22.  
  23. import android.os.Environment;
  24.  
  25. public class Places {
  26. public static File getScreenshotFolder() {
  27. File path = new File(Environment.getExternalStorageDirectory(),
  28. "/Acrylic Paint/");
  29. path.mkdirs();
  30.  
  31. return path;
  32. }
  33.  
  34. public static File getCameraTempFolder() {
  35. File path = new File(Environment.getExternalStorageDirectory(),
  36. "/Acrylic Paint/Temp/");
  37. path.mkdirs();
  38. // this folder should not be scanned
  39. File noScanning = new File(path, ".nomedia");
  40. if (!noScanning.exists())
  41. try {
  42. noScanning.createNewFile();
  43. } catch (IOException e) {
  44. // TODO Auto-generated catch block
  45. e.printStackTrace();
  46. }
  47. return path;
  48. }
  49.  
  50. public static File getCameraTempFile() {
  51. return new File(getCameraTempFolder(), "temp.jpg");
  52. }
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement