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

  • SEARCH
  • Home
  • 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 6926687
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:57:04+00:00 2026-05-27T10:57:04+00:00

I need to get Absolute path to Folder in Assets. Some like this for

  • 0

I need to get Absolute path to Folder in Assets.
Some like this for sd-card:

final String sdDir = Environment.getExternalStorageDirectory() + "Files";

What i do incorrect?

enter image description here

First I try to get path (in green ractangle) this way but I alwase get “False”.
Then I comment this block and try to get path from getAssets().list();
But I get 3 folders witch I see first time.

I want to make massive like this “green” but I need to use files from assets:

Look the image

Help me to get absolute path to my Files folder.

  • 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-05-27T10:57:04+00:00Added an answer on May 27, 2026 at 10:57 am

    I’m not exactly sure what you’re trying to do, so I’ll try to cover the bases, and maybe this will help.

    • If you are just trying to get a list of what’s in your assets, then
      use getAssets().list("Files"). (You have to use the subdirectory,
      because of this).

    • If you are trying to get an absolute path to your assets directory
      (or any subdirectory), you can’t. Whatever is in the assets directory
      is in the APK. It’s not in external storage like on an SD card.

    • If you are trying to open up files in the assets directory, use
      AssetManager.open(filename) to get the InputStream. Here,
      filename should be the relative path from the assets directory.


    EDIT

    I’m not sure what you mean by “massive”, but if you want to load the file black.png from assets instead of the SD card, then write this:

    // must be called from Activity method, such as onCreate()
    AssetManager assetMgr = this.getAssets();
    mColors = new Bitmap[] {
        BitmapFactory.decodeStream(assetMgr.open("black.png"));
        // and the rest
    };
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to get the absolute path of the assets folder in my app
I need to get a file name from file's absolute path (I am aware
I need to get the absolute path of the root in an asp.net mvc
I need to get the absolute value of an NSDecimalNumber without loss of precision.
Just need get some vals located in application.ini(main ini) in the Controller plugin I
I need to get some information that is contained in the MFT on a
How do I get the absolute or site-relative path for an included javascript file.
I am using Visual studio 2008 and I want to get the absolute path
I just define a root path as a constant like this define(ROOT_PATH, dirname(__FILE__)); so,
Does anyone know how to get programmatically the absolute path in the filesystem for

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.