tags:

views:

75

answers:

1

Hi,

I want to load a single XML file of 1.2Mb in android through assets folder as raw file. I heard that there is a limitation in android of 1Mb for a single xml file. How can i get rid of it? Is there any option to overcome this issue? please provide me some help UrGently!!!!!!!!!!!!.

Thanks in advance.

Praween

+4  A: 

First, don't use assets/ for XML, if your intention is to use it in your application. Use res/xml/, as parsing will be about ten times faster, and will also take up less space.

Then, I would simply try it with your file and see if it blows up. I know there is a limit, but I do not know what the threshold size is.

If it blows up, you will either need to split it into multiple files (each with a subset of your data), or not package it with the application, instead downloading it from a server on first run of your appl.

CommonsWare