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 8219215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T13:04:42+00:00 2026-06-07T13:04:42+00:00

I am devoloping an app where at certain points the user can save an

  • 0

I am devoloping an app where at certain points the user can save an image file to the sdcard.
All works fine when the phone is connected to the PC but when I disconnect my phone and launch the app, the file saving does not work.

I am guessing that I should use a different path to save when not connected to a PC?

my current path is

    "//mnt/sdcard/DCIM/Camera/image"+Math.random()*10000+".jpg"

I am using pure AS3 AIR to develop.

here’s the code:

var bmd:BitmapData = new BitmapData(Main.instance.stage.stageWidth, Main.instance.stage.stageHeight);
        bmd.draw(_board)
        var je:JPGEncoder = new JPGEncoder(100);
        var ba:ByteArray = je.encode(bmd); 

        var fl:File = File.documentsDirectory.resolvePath("//mnt/sdcard/DCIM/Camera/image"+Math.random()*10000+".jpg"); 
        try{
          var fs:FileStream=new FileStream;
          fs.open(fl,FileMode.WRITE);
          fs.writeBytes(ba,0,ba.length);
          fs.close();
        }
            catch(e:Error){
                Main.instance.tf.text = e.message;

            }

Thanks in advance,

  • 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-07T13:04:44+00:00Added an answer on June 7, 2026 at 1:04 pm

    Android application storage directories are as follows:

    Directory in which the app is installed (read-only)

    File.applicationDirectory
    /data/data/app.appID/app/assets
    

    Private storage directory for the app

    File.applicationStorageDirectory
    /data/data/app.appID/AppName/Local Store
    

    User’s home directory

    File.userDirectory
    /sdcard
    

    User’s document directory

    File.documentsDirectory
    /sdcard
    

    User’s desktop directory

    File.desktopDirectory
    /sdcard
    

    Temporary storage directory

    File.createTempDirectory()
    Created in /data/data/app.appId/cache
    

    Temporary file

    File.createTempFile()
    Created in /data/data/app.appId/cache
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing an app that can be used without logging in immediately, but certain
I am developing app in Visual studio 2010, my app is constantly connected to
I am developing facebook app in which i am fetching user's friend detail in
I'm currently developing a Window app that uses CheckedListBoxes for certain aspects of the
We are developing a web app that will have a pretty complex user and
I'm developing a PHP web app that handles information about certain companies. So far,
We all know how web browsers (such as Firefox) are certain to fill up
I am developing an app, and for debugging certain actions on first installation I
We're developing an Android app that relies on the accelerometer for certain features. I'm
I've developing a Cocoa app that has certain resources (images) which I wish to

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.