- Home
- Forum
- Xamarin.Forms
- Get path to saved sfChart image
Get path to saved sfChart image
Hi all,
Loving sfChart so far!
> root > sdcard > Pictures
Now I'd like to send an email with this image as an attachment. How do I find the path to the saved image?
I've tried var folder = Environment.GetFolderPath(Environment.SpecialFolder.X); where X is CommonDocuments, LocalApplicationData, Personal, CommonPictures, etc, but I haven't managed to find the correct one. Am I going about this the right way? What is the correct way to do this that will work on all Android devices?
Thanks,
David
SIGN IN To post a reply.
6 Replies
MK
Magesh Kumar Krishnan
Syncfusion Team
January 14, 2016 12:23 PM UTC
Hi David,
Thanks for using Syncfusion products.
We have prepared a sample to get the path of saved images for Android. Please find the sample from location given below.
http://www.syncfusion.com/downloads/support/forum/121651/ze/ChartSample_GetImagePath-554251726
Regards,
Magesh Kumar K
Thanks for using Syncfusion products.
We have prepared a sample to get the path of saved images for Android. Please find the sample from location given below.
http://www.syncfusion.com/downloads/support/forum/121651/ze/ChartSample_GetImagePath-554251726
Regards,
Magesh Kumar K
DC
David Conlisk
January 14, 2016 01:06 PM UTC
Hi Magesh,
Thanks, works perfectly!
David
DC
David Conlisk
January 22, 2016 10:04 AM UTC
Hi Magesh,
Now I have the same issue on the iOS version. It says here http://help.syncfusion.com/xamarin/sfchart/export that on iOS the image is saved in the "Photos/Album" folder, so I've been trying code like this:
var path = Environment.GetFolderPath (Environment.SpecialFolder.Personal);
var filePath = Path.Combine (path, "Photos/Album", attachmentName);
var graphImage = UIImage.FromFile (filePath);
var filePath = Path.Combine (path, "Photos/Album", attachmentName);
var graphImage = UIImage.FromFile (filePath);
But graphImage is always null. Any ideas?
Thanks,
David
ME
Manivannan Elangovan
Syncfusion Team
January 25, 2016 11:40 AM UTC
Hi David,
We have prepared a sample for getting the saved image from the image path in iOS and it can be downloaded from the following location.
Sample: GetImagePath
Regards,
Manivannan.E
We have prepared a sample for getting the saved image from the image path in iOS and it can be downloaded from the following location.
Sample: GetImagePath
Regards,
Manivannan.E
DC
David Conlisk
January 25, 2016 01:36 PM UTC
Hi Manivannan,
Ideally I would just be able to use the chart.SaveAsImage command out of the box for both platforms, rather than having to basically write my own version for iOS, but it works so thank you!
David
ME
Manivannan Elangovan
Syncfusion Team
January 26, 2016 08:04 AM UTC
Hi David,
Thanks for the update. Please let us know if you have any other queries.
Regards,
Manivannan E.
Thanks for the update. Please let us know if you have any other queries.
Regards,
Manivannan E.
SIGN IN To post a reply.
- 6 Replies
- 3 Participants
-
DC David Conlisk
- Jan 13, 2016 03:00 PM UTC
- Jan 26, 2016 08:04 AM UTC