Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7956187
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:55:13+00:00 2026-06-04T03:55:13+00:00

i am saving video and image in a folder ..now i want to make

  • 0

i am saving video and image in a folder ..now i want to make this folder as password protected , means while opening this folder needs to enter a password for view the file inside it
hope here ill get any relevant answer for doing this…if there some any other possible please suggest..

                     try {
                        dirName = "/mydirectory/";
                        fileName = new Long(
                                SystemClock.currentThreadTimeMillis())
                                .toString()
                                + ".png";
                    } catch (NullPointerException e) {
                        // TODO: handle exception
                    }
                    try {
                        if (android.os.Environment
                                .getExternalStorageState()
                                .equals(android.os.Environment.MEDIA_MOUNTED)) {
                            File sdCard = Environment
                                    .getExternalStorageDirectory();
                            File dir = new File(sdCard.getAbsolutePath()
                                    + dirName);
                            dir.mkdirs();

                            File file = new File(storedImagePath);

                            os = new FileOutputStream(file, true);

                            byte[] byteArray = receivedImageData.getBytes();

                            byteArray = Base64.decode(byteArray, 0);

                            os.write(byteArray);
                            os.flush();
                            os.close();

                        } else {

                        }

                    } catch (Exception e) {

                    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:55:15+00:00Added an answer on June 4, 2026 at 3:55 am

    I’d like to suggest a different/feasible approach, Encrypt your file!

    Look at this answer!

    Even if you are successful in implementing a password protection (Wow!) here are the cons,

    1. This will only protect when your app is running.
    2. SD cards are supposed to be transferred(Hence your app cannot protect the files on SDcard always).
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use until now this code for saving video that i get from UIImagePickerController
I am saving youtube video id's in my database and want to show that
I am trying to save multiple image using this code. But instead its saving
between saving a key name like this for(var key in this.data) { var key_name
Iam trying to saving an UIImage in PDF file. How can i do this?
I get from server images and videos by stream. Now I'm saving it: Stream
I'm trying to make a small program that will show a video from a
I m saving path of images, audio and video files that path is of
In order to make the streaming and saving data of the recording at the
hallo, i have found some iphone-camera-video-saving avfoundation code examples over the net (and also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.