title: Can I create a custom image MIME type in Android?
body: <p>My app created a custom .PNG file that's backward compatible with standard .PNG, but I would like my app to be able to recognize my special .PNGs (rather than default to Gallery).  After creating the image, I try to register it with a custom MIME type, but they are still being scanned in as regular PNGs.</p>
  
  <pre><code>File file = new File("/mnt/sdcard/custom.png");
  //now scan the file into the content database
  MediaScannerConnection.scanFile(this,
              new String[] { file.toString() }, new String[] { "image/x-custom" },
                  new MediaScannerConnection.OnScanCompletedListener() {
              public void onScanCompleted(String path, Uri uri) {
                  Log.i("ExternalStorage", "Scanned " + path + ":");
                  Log.i("ExternalStorage", "-&gt; uri=" + uri);
  
                  ContentResolver cr = getContentResolver();
                  String mime = cr.getType(uri);
                  //mime returns image/png, not image/x-custom :(        
              }
  </code></pre>
  
  <p>Any ideas on how to get Android to recognize my custom MIME type, and/or allow my app to recognize the extended .PNG?</p>