I use Xam.Plugin.Media Camera option. My app takes photo and uploads this photo to a remote server. I want the user to choose whether can save the picture or not save on phone while they use Xam.Plugin.Media Camera option. So I did a basic UI for this. After the user's choice, I set SaveToAlbum (true or false) It works on iOS good. But on the Android, it doesn't work on SD card.
After taking photo using
await CrossMedia.Current.TakePhotoAsync(new Plugin.Media.Abstractions.StoreCameraMediaOptions { } )
the following cases are can take place:
- If
SaveToAlbum == trueand phone camera setting is SD card, Xam.Plugin.Media saves photo twice, one to internal storage and one to SD card while it should save just one photo in internal storage. - If
SaveToAlbum == trueand phone camera setting is internal storage, Xam.Plugin.Media saves photo twice, just in internal storage while it should save just one photo in internal storage. - If
SaveToAlbum == falseand phone camera setting is SD card, Xam.Plugin.Media saves photo only once, just SD card. It should have never saved any images. - If
SaveToAlbum = falseand phone camera setting is internal storage, Xam.Plugin.Media saves photo just once in internal. It should have never saved any images.
The problem is not happen on every android phone. For example, Samsung phone is working properly but LG phone is not. When opening camera on Samsung phone at the first time, asks "default storage space will be sd card" (ok or cancel). When opening camera on LG phone at the first time, asks "do photos save to sd card" (ok or no) but, it is saving photos whatever the answer
How can I fix this? Thank you.