Android Question XML String Replace Problem

SinanTasgin

Member
Licensed User
Longtime User
Hi ,

I have an issue about web services which i require your assistance. The device is working properly when i create an xmlString which has between 300-500 records in it.

But when it gets over 500 records (eg 1400) I replace my xmlString with a for loop. But unfotunately this makes the device pause and it terminates. I have the same issue when I run the program in debug mode and also in release mode.

The program runs the for loop for max 500 records but it terminates itself when records gets over 500. So I will be so grateful if you come up with an advice and help me out with this problem.
 

DonManfred

Expert
Licensed User
Longtime User
see the log for errors. There MUST be some who tells what´s wrong if the app just quits...
 
Upvote 0

SinanTasgin

Member
Licensed User
Longtime User
I can't see in log .

For loop is not finished .
Cursor2.RowCount = 1008
The sayac (counter ) is between 400 to 500 on average .
XML string for the overload hangs.
The loop should continue, however, the program is not going to happen.

1111.png
 
Last edited:
Upvote 0

SinanTasgin

Member
Licensed User
Longtime User
As shown in the photo section of the <details> to produce 1008 units.

Is it a problem XML string of overload ?
detay.png
 
Last edited:
Upvote 0

KMatle

Expert
Licensed User
Longtime User
I would write the xml to a FILE instead of using a string...

My opinion: Keeping huge data structures in memory is a programming mistake (>1000 units -> bad). For this we have files or databases.

XML is nice (I use it a lot) but keep an eye on the data/overhead ratio (does it make sense to store 4 bytes in a structure which needs 50 to keep it?)
 
Upvote 0
Top