12-15-2012 01:19 AM
I am trying to port over my Playbook application which is coded in html webworks, the problem is that there seems to be a limitation for the BB10 that wasn't present on the Playbook.
The following line of code works on my Playbook App, but it does not work in my BB10 App.
db = openDatabase("databasetest", '1.0', 'Test', 30 * 1024 * 1024);
(That should translate to about 30MB of storage)
My app works okay with the above line of code on the Playbook (though I have heard that some users experienced problems with a white screen). On the otherhand, on my BB10 Dev Alpha, when I try to test it, it gives me a white screen and it doesn't seem like the application is loaded since I can't get the web inspector to show up.
If I reduce it to 5MB
db = openDatabase("databasetest", '1.0', 'Test', 5 * 1024 * 1024);
The application starts fine, but I then need to store data into the database, which doesn't work, presumable because it runs out of space. The following bit of code is run
db.transaction(function(tx){
var branch = null;
var i =0;
for(i=0;(i<branchOffices.length);i++){
branch = branchOffices[i];
tx.executeSql('INSERT INTO branches (column1,column2) VALUES (?, ?)', [ branch.column1, branch.column2 ] );
}
});but nothing gets stored.
If I reduce the loop to stop at 1/10th of the data, which is ~3MB, it works fine.
Which shows that it will only allow up to a certain limit (which I presume to be ~5MB)
How do I get around this limit?
This is so frustrating!
I thought porting from the Playbook was supposed to be easy!
12-17-2012 01:55 PM
This sounds like a bug.
Can you create a (complete but) minimal test app please - that will help for reporting to development.
Thank you.
12-17-2012 02:04 PM
A bug of the PB? Or the BB10?
I asked about the webSQL limit during the portathon this weekend and was mentioned that indeed BB10 has a limit (RIM guy quoted 10 MB but he wasn't sure)
12-17-2012 04:43 PM
People I spoke to made it sound like the issue is with BlackBerry 10.
12-17-2012 05:22 PM
I see.
Well, if it's a bug, hopefully it gets fixed.
I spent all saturday and sunday trying to figure out the problem and in the end I solved it by compressing some data and recoding my app to work around the limit for now.
Would be nice to fix the limit though.
You mentioned that I should create a (complete but) minimal test app? Who would I send that to?
I did already provide the snippets of code that caused the problem, so maybe the dev team can work with that? It shouldn't take more than a few minutes to package the snippet of code. And maybe create a simple loop to fill the database.
12-17-2012 05:52 PM