I am trying to write a Java application that will generate SVG image based on XML file. The application should also be able to show SVG file. My application should run on Android platform and desktop PCs. I read about Swing + Batik but afaik it will not work on Android. What is the best library to achieve this ?
Asked
Active
Viewed 5,928 times
3 Answers
7
This article in Code Project deals with the subject. Two approaches are presented:
- android-libsvg library.
- Anti Grain Geometry engine.
Both solutions have dependencies on native code library, so you would need JNI.
There is also svg4mobile project, which only uses Java.

kgiannakakis
- 103,016
- 27
- 158
- 194
2
per this thread: libsvg ported
libsvg has been ported to android..see thread for details. You need a crystax form of NDK, ie exceptions enabled..build/install doc here at:build-install-doc

Community
- 1
- 1

Fred Grott
- 3,505
- 1
- 23
- 18
2
Also try this open-source library, Apache 2.0 license:
Performance is good as the actual drawing is handled natively by an android.graphics.Picture object.

pents90
- 1,782
- 17
- 17
-
Can i create svg using this library in android ?? – Rakesh Gondaliya Jan 15 '14 at 11:53
-
@RakeshGondaliya No, just load and render them. – pents90 Jan 20 '14 at 23:25