Note that there are some explanatory texts on larger screens.

plurals
  1. POOfficial Facebook App seems to be deleting my photos when selected through Share API
    primarykey
    data
    text
    <p>My app allows you to share a photo from a gallery view to other services, such as Facebook. I am launching a dialog to allow the user to select which service they want. The code looks like this:</p> <pre><code>public void sharePhoto(String fileName) { logger.debug("User selected to share photo {}", fileName); final String extension = FilenameParser.extension(fileName); String mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toLowerCase()); if(mimeType == null) { mimeType = MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension.toUpperCase()); } if(mimeType == null) { logger.warn("Unable to share file {} because it's mime type could not be determined by the system.", fileName); Toast.makeText(MainActivity.this, String.format("Cannot share file %s because of an unknown file type.", selectedFile.getFileName()), Toast.LENGTH_SHORT).show(); } else { logger.debug("Launching Share Intent for file {}", fileName); Intent share = new Intent(Intent.ACTION_SEND); share.setType(mimeType); share.putExtra(Intent.EXTRA_STREAM, Uri.parse("file://" + fileName)); startActivity(Intent.createChooser(share, "Share")); } } </code></pre> <p>The code seems to be working just fine. If I select services such as Flickr, Dropbox, Gmail, or the HTC Facebook app, everything is perfect. If I select the Official Facebook app, and try to upload the photo through it, the photo is deleted from the SD card! It seems to be deleted (or moved?) whether you go through and finish the upload process, or cancel it. </p> <p>I've stepped through my code about a dozen times making sure that there's no way my delete photo code is running in this case (it is another menu item if the user wants to do that). I have a lot of trace in my delete code, and that code is not executing. </p> <p>If this isn't a known issue (or an issue with the way I am launching FB), does anyone know how to file a bug report with them?!?</p> <p>Thanks, Kevin</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload