Reputation: 714
Here's what I have so far:
var file = Android.OS.Environment.DirectoryPictures + "/test1.jpg";
ImagePhoto.Source = ImageSource.FromFile(file);
However, no image is being set. I've double checked that the test1.jpg file exists in the device's local storage Pictures folder, and it's there when I navigate to it using File Commander. Can anyone help?
Upvotes: 1
Views: 298
Reputation: 714
I managed to solve this using the Environment variables:
var file = Android.OS.Environment.ExternalStorageDirectory + "/" + Android.OS.Environment.DirectoryPictures + "/test1.jpg";
Upvotes: 1