Hi,
firstly many thanks for taking the time to read through this, hope you can help me out.
I've got an app deployed on the market which I developed on my HTC sensation, where it works fine. Now that its live we're getting some people saying its not working on their handsets, I managed to borrow one of the problem phones last week (a sory ericcson xperia mini pro) and have managed to see where the app is hanging.
I'll give a quick outline of the process:-
1. the app downloads an xml file from a webserver
2. it stores this file locally on the phone
3. this xml file is used to populate an sqllite database on the phone
The app works perfectly for steps 1 and 2. The problem arises on step 3, when its attempting to populate the biggest table within the database.
Here are the problem sql statements:-
1. DROP TABLE IF EXISTS [menuitem]
2. CREATE TABLE IF NOT EXISTS [menuitem] ([id] TEXT, [restaurant_id] TEXT, [title] TEXT, [description] TEXT, [menugrouping_id] TEXT, [price] TEXT, [flag_veg] TEXT, [flag_vegan] TEXT, [flag_gluten] TEXT, [flag_heat] TEXT, [flag_fish] TEXT, [menu1] TEXT, [menu2] TEXT, [menu3] TEXT, [menu4] TEXT, [menu5] TEXT, [menu6] TEXT)
3. InsertMaps (first query out of 1458): INSERT INTO [menuitem] ([id], [restaurant_id], [title], [description], [menugrouping_id], [price], [flag_veg], [flag_vegan], [flag_gluten], [flag_heat], [flag_fish], [menu1], [menu2], [menu3], [menu4], [menu5], [menu6]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
As I have mentioned these statements work perfectly on my phone (HTC sensation) and on the other HTC models I've tested, but not on some other models.
Now my assumption is that its the number of row inserts I'm doing (1458 in total) that is somehow causing the app to crash, probably because of some memory issue (although I checked on the test phone and it had plenty of free space). Perhaps its a RAM issue?
Anyway would greatly appreciate any advice or workaround solution.
Thanks!
Yonson
firstly many thanks for taking the time to read through this, hope you can help me out.
I've got an app deployed on the market which I developed on my HTC sensation, where it works fine. Now that its live we're getting some people saying its not working on their handsets, I managed to borrow one of the problem phones last week (a sory ericcson xperia mini pro) and have managed to see where the app is hanging.
I'll give a quick outline of the process:-
1. the app downloads an xml file from a webserver
2. it stores this file locally on the phone
3. this xml file is used to populate an sqllite database on the phone
The app works perfectly for steps 1 and 2. The problem arises on step 3, when its attempting to populate the biggest table within the database.
Here are the problem sql statements:-
1. DROP TABLE IF EXISTS [menuitem]
2. CREATE TABLE IF NOT EXISTS [menuitem] ([id] TEXT, [restaurant_id] TEXT, [title] TEXT, [description] TEXT, [menugrouping_id] TEXT, [price] TEXT, [flag_veg] TEXT, [flag_vegan] TEXT, [flag_gluten] TEXT, [flag_heat] TEXT, [flag_fish] TEXT, [menu1] TEXT, [menu2] TEXT, [menu3] TEXT, [menu4] TEXT, [menu5] TEXT, [menu6] TEXT)
3. InsertMaps (first query out of 1458): INSERT INTO [menuitem] ([id], [restaurant_id], [title], [description], [menugrouping_id], [price], [flag_veg], [flag_vegan], [flag_gluten], [flag_heat], [flag_fish], [menu1], [menu2], [menu3], [menu4], [menu5], [menu6]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
As I have mentioned these statements work perfectly on my phone (HTC sensation) and on the other HTC models I've tested, but not on some other models.
Now my assumption is that its the number of row inserts I'm doing (1458 in total) that is somehow causing the app to crash, probably because of some memory issue (although I checked on the test phone and it had plenty of free space). Perhaps its a RAM issue?
Anyway would greatly appreciate any advice or workaround solution.
Thanks!
Yonson