title: How to create a directory on the internal storage upon installation of the Android application?
body: <p>I want to have a single folder where I will put all the resources I'm going to need and I want it on the internal storage. Since I want this directory to be created only once, I found out that I should create it in the main activity of the application:</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_main);
      File directory = context.getDir("mydir", Context.MODE_PRIVATE);
      Log.d("directory", directory.getAbsolutePath().toString());
  } 
  </code></pre>
  
  <p>It seems ok as this is what I was able to find on the internet, however I am receiving loads of erros, I can get to the log for the directory path and the application doesn't start. Any idea why?</p>
  
  <p>Also, if I work with internal storage every time when I run my application from Eclipse to my phone, does it automatically deletes the previous one together with its resources or I've to do that manually?</p>