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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:13:24+00:00 2026-05-31T16:13:24+00:00

How is it possible to save a file to the android phone rather than

  • 0

How is it possible to save a file to the android phone rather than the sdcard? I know that for sdcard the way you do it is by calling Environment.getExternalStorageDirectory().getAbsoluteDirectory(); or something like that anyway I have it working that way. But I want to be able to save to my phone instead, do I need a permission in my manifest to do that? I have tried replacing the getexternalst…. to getDataDirectory instead but that didnt seem to work.

As always, please and thank you 🙂

EDIT—————

03-15 21:29:26.213: W/dalvikvm(21686): threadid=1: thread exiting with uncaught exception (group=0x2aac8578)
03-15 21:29:26.213: E/AndroidRuntime(21686): FATAL EXCEPTION: main
03-15 21:29:26.213: E/AndroidRuntime(21686): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.alphaphonefinder/com.alphaphonefinder.Main}: java.lang.NullPointerException

  • 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-31T16:13:25+00:00Added an answer on May 31, 2026 at 4:13 pm

    You can use Context#getFilesDir

    To get the full path as String (assuming this is the Activity):

    String path = this.getFilesDir().getAbsolutePath();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I iwant to know the best way to read an xml file and save
Is that possible to save colorcodes in Plist file somehow? Do I have to
I had a quick question. Is it possible to save a file without actually
Is it possible to save a form in VBA as .exe file and then
Possible Duplicate: Create Excel file in Java How to save output in excel format
Is it possible to save ViewState information, e.g. to session, so that when you
When working with htaccess files on Windows, is it possible to save the file
Is it possible to save the layout diagram from a DBML file as a
Is there a way to save a file in HDFS using MapR distribution of
What is the best way to save a file from internet on javascript and/or

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.