Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry® World™ Development

Reply
New Contributor
rusted88
Posts: 3
Registered: ‎04-16-2012
My Device: Torch 9800
Accepted Solution

App not working when downloading from app world

I just got started with developping apps for the playbook, and now that my first app is finished. Everything is working fine when I was launching it from flex builder, after that I sent it to get approved by app world but when I download it from app world it seems like it can't create a file a used as my sqlite db is there something differente I need to do when getting the app on app world? or is it in the build release process that I'm doing something wrong? or do I need a user permission to us sqlite on the playbook?

 

 

this is the app http://appworld.blackberry.com/webstore/content/reviews/103816/?lang=EN

 

thanks

My Apps: Multiplication Table
Website : GFDSA.CA
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: App not working when downloading from app world

If you are storing the data in the shared area, you have to set the permissions to allow the file to be stored there. If you are storing to app-storage, then no permissions need to be set. You can also check that the user has not changed the shared permission setting by checking if the document directory from the File class exists or not and then show an alert letting them know that they need to fix their settings for your app.
New Contributor
rusted88
Posts: 3
Registered: ‎04-16-2012
My Device: Torch 9800

Re: App not working when downloading from app world

i don't think thats the problem, because i added so it asks for the permission to store files and still with that it does not work when i download it from the app store but when I launch it on my playbook from flex builder it works.

 

here is how its setup for the db, is there anything wrong that makes it not work from the app world?

 

protected var folder:File = File.applicationDirectory;
				protected var dbPath:File = folder.resolvePath("mydatabase.db");

					sqlConn.open(dbPath);
					sqlStatement.sqlConnection = sqlConn;
					sqlStatement.text = "CREATE TABLE IF NOT EXISTS Results(P_Id int PRIMARY KEY,BaseMultiple int,ResultPerc int)";
					sqlStatement.execute();
My Apps: Multiplication Table
Website : GFDSA.CA
Developer
jtegen
Posts: 6,541
Registered: ‎10-27-2010
My Device: HTC One, PlayBook, LE Z10, DE Q10

Re: App not working when downloading from app world

You are trying to modify something in the "app"directory. You cannot do this. The "app" directory is read-only. If the database is packaged with your app, you need to copy it to the "app-storage" directory if it does exists there yet and then open if from there.
New Contributor
rusted88
Posts: 3
Registered: ‎04-16-2012
My Device: Torch 9800

Re: App not working when downloading from app world

I found something about that http://www.placona.co.uk/665/flex/sqlite-databases-and-mobile-applications-a-caveat/

so I changed like in this article waiting for the new version to get approved to test it from the app world.

 

Thanks

My Apps: Multiplication Table
Website : GFDSA.CA