Esempio n. 1
0
 public void copyImageToPrivateStorage(Message message, Uri image) throws FileCopyException {
   String filename =
       fileDateFormat.format(new Date(message.getTimeSent()))
           + "_"
           + message.getUuid().substring(0, 4);
   switch (Config.IMAGE_FORMAT) {
     case JPEG:
       message.setRelativeFilePath(filename + ".jpg");
       break;
     case PNG:
       message.setRelativeFilePath(filename + ".png");
       break;
     case WEBP:
       message.setRelativeFilePath(filename + ".webp");
       break;
   }
   copyImageToPrivateStorage(getFile(message), image);
   updateFileParams(message);
 }
Esempio n. 2
0
 public void updateFileParams(Message message) {
   updateFileParams(message, null);
 }