Class ChatUIStorageUtils

  • All Implemented Interfaces:

    
    public class ChatUIStorageUtils
    
                        

    Storage utility class for ChatUI media operations.

    • Constructor Detail

      • ChatUIStorageUtils

        ChatUIStorageUtils()
    • Method Detail

      • getSavePath

         static String getSavePath(Context context, String type, int res)
      • writeToPublicDir

         static void writeToPublicDir(File pFile, ParcelFileDescriptor pParcelFileDescriptor)
      • read

         static void read(ParcelFileDescriptor parcelFileDescriptor, File dst)
      • copy

         static void copy(FileInputStream ist, FileOutputStream ost)
      • getContentUri

         Uri getContentUri(int type, String id)
        Parameters:
        type - MediaStore type: 0 for Images, 1 for Video, 2 for Audio
        id - MediaStore."xxx".Media.
        Returns:

        content uri

      • saveMediaToPublicDir

         static boolean saveMediaToPublicDir(Context context, File file, String type)
        Parameters:
        context - context
        file - source file
        type - ChatUIStorageUtils.
        Returns:

        whether the media was saved to the public directory successfully

      • saveMediaToPublicDir

         static boolean saveMediaToPublicDir(Context context, File file, String outputFileName, String type)
        Parameters:
        context - context
        file - source file
        outputFileName - output file name (without path)
        type - ChatUIStorageUtils.
        Returns:

        whether the media was saved to the public directory successfully