- This topic has 7 replies, 3 voices, and was last updated 12 years, 4 months ago by
Karzulovic.
-
AuthorPosts
-
KarzulovicMemberIs it posible to use javascript in order to create a .txt file and store it in the internal memory of the phone?
The idea is to store some information that the user provides and export it to the txt file so that i can view it in my pc
(>’.’)>?
support-michaelKeymasterMobiOne support your custom javascript to capture and hold data in memory and then send it to a webservice for handling. Apps do this all the time when capturing user inputs and submitting them to their own backend for processing. From the small amount of info you have shared it does not seem that you need a physical file of any sort unless you plan for the data to persist across sessions. And even then there are other mechanisms that may be much more efficient and simple than mess’n with files, e.g., html5 localstorage.
KarzulovicMemberThe idea is that i can export a .txt file so that i can later manipulate with other programs. At least to my knowledge txt files are much easier to import and manipulate this is why im asking.
I need to import the txt into a webpage, the idea is that the user does not need internet to input the data and then i can recollect all the data.
Or is there an easier way?
Keep in mind that this app is for a proyect so i know the ppl using it, its not to distribute in google play, appstore, etc.
thanks
KarzulovicMemberMy solution was to create a local database and when the user has internet give him the option to upload it to the main database
I used this example on using SQL with mobiONE
http://www.genuitec.com/support-genuitec/viewtopic.php?f=8&t=1037&start=0
support-michaelKeymasterI generally discourage use of websql unless it is really needed and you know your s**t and are good with complex async js programming. Do you really need a sql db? I ask because this is one of the more abused features that I see used by devs and confused by devs on these forums.
Give html5 localstorage a look first before jumping on the websql pain train.
KarzulovicMemberI’m now using local db but i have a problem with page transitions.
My code runs fine at first.
I have 3 pages:
-Create db
-Create table
-Insert dataAt first they all run fine but if I go back and try to create a new table for example:
Create db -> Create table -> insert data -> Create table (a new one)
The test center gets non responsive and i have to restart mobione
It also happens with dbsBut if I merge the 3 pages into 1 everything runs fine.
I’ve checked the code and all items are correctly assigned to each page.
Any ideas?
ThanksAlso if I try to insert more than 20 columns into a table test center also gets stuck
:O
support-octavioMemberHi Karzulovic,
We have replicated the issue with the 19 columns. Until we resolve this issue we recommend that you use a tool such as the chrome webinspector for websql development & testing.
Re transition+sql problem: Can you share your project with us to investigate? Send a zip file to support at genuitec dot com, use title: mobione data from Karzulovic
KarzulovicMemberI already erased that proyect :/
Now I just merged everything into 1 page and rearranged the tables and so far everything is running fine -
AuthorPosts