last day (14 days later) » 

6:58 AM
0
A: java.lang.OutOfMemoryError when parsing xml

VaishaliThere are heap restrictions for android, read the XML data in chunks from your file and parse it conveniently OR Try to put android:largeHeap="true" in application tag in manifest file.

 
I am already have it in my manifest
 
then , There are heap restrictions for android, read the XML data in chunks from your file and parse it conveniently
 
ok , how can I do it without changing the webservice ? can I do that in my android app ?!
 
yes , you can do in your app, first parse some data from your file and store it somewhere and then parse again remaining chunk of data
 
sounds good , can you give me an example please !?
 
6:58 AM
here your loop execute up to nl.getLength() instead of it you can execute it nl.getLength()/2 ( execute half number of nl.getLength() )
 
why to do that ?! I want to display all the data ?!
 
hello
first of all thank you for reply :)
my error reason it's not because the loop !!! it's because the xml document getting from the service
 
oh okay
have you try it first ?
 
yeah , it's too big ... my app crash before the loop :(
yeah , and it's crash the same way
 
7:25 AM
then again slipt your loop
split*
that means take it up to nl.getLength()/8
@A
@AmerHadi hello
 
7:46 AM
crash again with the same exception :(
@V
@Vaishali
I read about it , and someone said :
Save your SOAP XML stream directly to disk as you download it. Don't store it in memory.
do you know how :(
 
8:39 AM
have you use async task ?
 
yeah
@Vaishali
 
you have to download xml file in your devices
 
yeah as i told you ... but my data is daynamic
do you know how to do that ??
 
and there is give github link also
so you can got idea about how to download and use it
data is coming from webservice ?
 
I will read it
thank you
 
8:44 AM
okay
 
yeah from wbservice
thank you
 
then you can use it
please see kinghomer answer
okay
 
thank you man for help
I will vote up to ur comments
 

last day (14 days later) »