We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Error Exporting chart to Android

Thread ID:

Created:

Updated:

Platform:

Replies:

131874 Aug 1,2017 11:21 AM UTC Aug 3,2017 04:05 PM UTC Xamarin.Forms 3
loading
Tags: SfChart
Raymond Dillon
Asked On August 1, 2017 11:21 AM UTC

Hi,

I have a XF chart in my project and the export to iOS works OK, but the export on Android fails with:

08-01 11:44:32.066 I/MonoDroid(22305): Java.IO.IOException: No such file or directory
08-01 11:44:32.066 I/MonoDroid(22305):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Java.Interop.JniEnvironment+InstanceMethods.CallBooleanMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00069] in <bd30a18775d94dc8b6263aecd1ca9077>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualBooleanMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x0002a] in <bd30a18775d94dc8b6263aecd1ca9077>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Java.IO.File.CreateNewFile () [0x0000a] in <61dabd3f0b0446bc8b570d6071d995d7>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Syncfusion.SfChart.XForms.Droid.ChartDependencyService+<SaveAsImage>d__0.MoveNext () [0x00042] in <1e4446e48e6b4cf595ae2a48676fdb4d>:0
08-01 11:44:32.066 I/MonoDroid(22305): --- End of stack trace from previous location where exception was thrown ---
08-01 11:44:32.066 I/MonoDroid(22305):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <3fd174ff54b146228c505f23cf75ce71>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in <3fd174ff54b146228c505f23cf75ce71>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Android.App.SyncContext+<>c__DisplayClass2_0.<Post>b__0 () [0x00000] in <61dabd3f0b0446bc8b570d6071d995d7>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <61dabd3f0b0446bc8b570d6071d995d7>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <61dabd3f0b0446bc8b570d6071d995d7>:0
08-01 11:44:32.066 I/MonoDroid(22305):   at (wrapper dynamic-method) System.Object:9debb56f-082e-408f-8b9b-98f0b0ee179e (intptr,intptr)
08-01 11:44:32.066 I/MonoDroid(22305):   --- End of managed Java.IO.IOException stack trace ---
08-01 11:44:32.066 I/MonoDroid(22305): java.io.IOException: No such file or directory
08-01 11:44:32.066 I/MonoDroid(22305):  at java.io.UnixFileSystem.createFileExclusively0(Native Method)
08-01 11:44:32.066 I/MonoDroid(22305):  at java.io.UnixFileSystem.createFileExclusively(UnixFileSystem.java:280)
08-01 11:44:32.066 I/MonoDroid(22305):  at java.io.File.createNewFile(File.java:948)
08-01 11:44:32.066 I/MonoDroid(22305):  at md5270abb39e60627f0f200893b490a1ade.ButtonRenderer_ButtonClickListener.n_onClick(Native Method)
08-01 11:44:32.066 I/MonoDroid(22305):  at md5270abb39e60627f0f200893b490a1ade.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.view.View.performClick(View.java:6199)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.widget.TextView.performClick(TextView.java:11090)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.view.View$PerformClick.run(View.java:23647)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.os.Handler.handleCallback(Handler.java:751)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.os.Handler.dispatchMessage(Handler.java:95)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.os.Looper.loop(Looper.java:154)
08-01 11:44:32.066 I/MonoDroid(22305):  at android.app.ActivityThread.main(ActivityThread.java:6682)
08-01 11:44:32.066 I/MonoDroid(22305):  at java.lang.reflect.Method.invoke(Native Method)
08-01 11:44:32.066 I/MonoDroid(22305):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
08-01 11:44:32.066 I/MonoDroid(22305):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)


I have WRITE and READ external storage permissions in my Android Manifest file but it isn't making a difference.

Any suggestions?

Regards,

Raymond

Saravana Pandian Murugan [Syncfusion]
Replied On August 2, 2017 02:29 PM UTC

Hi Raymond,

Thanks for contacting Syncfusion support.

We were not able to reproduce the reported issue at our end and we have prepared a sample for this. Please update us the modified sample to reproduce the issue which will be helpful for providing further assistance on this.

Sample: http://www.syncfusion.com/downloads/support/forum/131874/ze/SaveAsImage-960786600

Note:

The exported image will be saved in different location across the platforms.

Android – The image will be saved inside the Pictures directory. You can find it using the file explorer application.

iOS – The image will be saved inside the “Photos/Album” directory.

UWP – A Save as dialog box will appear to choose the storage location.

Please let us know if you are still facing this issue.

Regards,
Saravana Pandian M.


Raymond Dillon
Replied On August 2, 2017 02:53 PM UTC

Hi,

The sample works perfectly, but I am unsure how as there are no permissions set in the manifest - particularly for accessing files?

Regards,

Raymond


Saravana Pandian Murugan [Syncfusion]
Replied On August 3, 2017 04:05 PM UTC

Hi Raymond, 
 
Regarding  but I am unsure how as there are no permissions set in the manifest - particularly for accessing files? 
 
You no need to enable Read/Write permission to save Chart as an image. In source level, we save this chart as an image by creating a new file (name of the image file) under Pictures folder of ExternalStorage. 
 
Are you able to run our sample in the device in which you are facing this issue? If yes, can you able to see the chart image under Pictures folder? 
 
If not, please update us the modified sample or update us the with more details (Device details) in which you are facing this issue which will be helpful to assist you further. 
 
Regards, 
Saravana Pandian M. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;