title: Nexus 4 not showing files via MTP
body: <p>I'm trying to simply write a simple XML file to the SD card and I noticed that my Nexus 4 does write the file, but it is not viewable via the MTP protocol using Windows 7.</p>
  
  <p>code:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  
      CustomerQueryRqType customerQueryRequest = new CustomerQueryRqType();
      Serializer serializer = new Persister();
      File myFile = new File(Environment.getExternalStorageDirectory() + "/customerQueryRequest.xml");
  
      try {
          boolean created = myFile.createNewFile();
          serializer.write(customerQueryRequest, myFile);
      } catch (Exception e) {
          e.printStackTrace();
      }
  }
  </code></pre>
  
  <p>I can see the file on the phone itself with Astro File Manager:</p>
  
  <p><a href="https://i.stack.imgur.com/zsKo0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/zsKo0.png" alt="Screenshot"></a></p>
  
  <p>but Windows doesn't see it...:</p>
  
  <p><a href="https://i.stack.imgur.com/Bi67e.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Bi67e.png" alt="Screenshot"></a></p>
  
  <p><code>adb shell</code> on the directory shows:</p>
  
  <pre><code>ls -l
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Alarms
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Android
  drwxrwxr-x root     sdcard_rw          2012-11-21 19:30 DCIM
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Download
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Movies
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Music
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Notifications
  drwxrwxr-x root     sdcard_rw          2012-11-19 12:06 Pictures
  drwxrwxr-x root     sdcard_rw          1970-01-16 20:51 Podcasts
  drwxrwxr-x root     sdcard_rw          2012-11-19 13:22 Ringtones
  drwxrwxr-x root     sdcard_rw          2012-11-19 14:33 bluetooth
  -rw-rw-r-- root     sdcard_rw       79 2012-12-05 22:26 customerQueryRequest.xml
  drwxrwxr-x root     sdcard_rw          2012-11-20 02:50 data
  -rw-rw-r-- root     sdcard_rw    11394 2012-11-19 13:54 eightpen_custom_gestures
  drwxrwxr-x root     sdcard_rw          2012-11-19 13:17 media
  </code></pre>
  
  <p>What's going on with my Nexus 4?  Why is it hiding my things from Windows?</p>