0

I have been working on an android app that has uploading pictures and PDF files as one of its functions but i have a limited experience when it comes to the "uploading" activity for the PDF file (files excluding media files), although i have managed to successfully write the code for the "uploading" activity for images (part of that code can be found below). so the question is, what code template should i follow for the upload activity of the PDF file? and if you have any advice on how to make the uploading procedure faster or optimized it would be greatly appreciated.

        case R.id.selectImageToUpload:
            Intent galleryIntent = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);
            startActivityForResult(galleryIntent, RESULT_LOAD_IMAGE);
            break;
        case R.id.selectFileToUpload:   break;

0 Answers0