- This topic has 14 replies, 9 voices, and was last updated 10 years ago by support-michael.
-
AuthorPosts
-
xyz1969MemberI see options under TOOLS for local storage (database, local storage, session storage). But none of these tools are available. How can I access to local storage tool?
wayneModeratorYou may only browse the DB of the active webapp in the browser. Thus you’ll need to load a webapp that uses local storage.
Try this:
1) launch the Test Center (expand tool panel if no open initially)
2) from Home Screen launcht the Sticky Notes app
3) from Tool Panel navigate to Tools>Local Storage
4) select the Database node and the WebKitStickyNotes DB
see screenshot belowWayne
Genuitec Mobile Team
See attachment stickynotes-db.pngAttachments:
You must be logged in to view attached files.
pemurrayMemberOkay, Cool!!
Can I use this tool to create my own database or do I have to import one?
Also, Wayne, since you are obviously the ‘Voice’, can you kindly comment on the use of cookies?
It is starting to appear that this is an advanced tool, but you have to pull away the layers. Like an onion. I am thinking Shrek.
pemurrayMemberHold the phone…
Thanks Wayne, for providing the example of StickNotes with the database.
I brought up my current app that I am working on and I do not see anything that doesn’t start with ‘Clear…’ under the storage options.
I double checked the tool and I do not see anywhere to declare an existing database or define one.
I want to be able to have my users store frequently used addresses as part of the app.
Can you kindly point me in the right direction?
Thanks!!
Paul
wayneModeratorThe MobiOne iPhone emulator supports 3 forms of standard client-side data storage: 1) HTML5 Web DB (relational data storage), 2) HTML5 Local Storage (name-value pair storage) and 3) traditional cookies. Getting started client-side data storage is a straight forward process assuming you are comfortable coding with javascript.
The “local storage inspector” provides insight into the data storage of the currently loaded webapp. MobiOne does not yet provide tools for creating web DBs other local storage. To clear the emulator’s data storage for all webapps see the Test Center’s Settings>Cache and Databases.
Here are just few resources you may find use for getting started:
http://developer.apple.com/library/safari/#codinghowtos/Desktop/DataManagement/
http://dev.w3.org/html5/webstorage/
Wayne
Genuitec Mobile Team
Albatros78ParticipantHi all,
as Wayne’s recommandation I post here a sample of how to create a local storage db with your application.
It’s just an example created, and based on:
I tested this script and it’s works fine on my Windows PC with Safari 5.02, and also with monione 1.0M9U4
How to create your DB:
On Windows PC:
—————
– Just open the index.html file from safari.
– And create your db with a choosed name and click save.
– Refresh this page to see your created db.
– You can click edit to add some data into it, and click on save button.On Mobione:
————
– Launch any template or personal application.
– Click on the home button of iPhone
– Choose to navigate with Safari (icon on the left bottom)
– Put the url where is based your html file on you hard disk (c:\sample\index.html)VERY IMPORTANT with iPhone Test Center. Need to “rotate to Landscape” to see the save button during data adding.
– And do the same as explained for Windows PCProbably need to be more accurate, but it’s a beginning.
Nota: Wayne, I repeat again that it would be very nice to have a sample section into the forum, where anyone can to post or to find community samples, and also samples from Mobione team.
Hope this helps.
Have fun !
Attachments:
You must be logged in to view attached files.
Albatros78ParticipantHi everybody,
Look at my last post at:
http://www.genuitec.com/support-mobione/viewtopic.php?f=8&t=1037
I give you a sample of how to create and use a Local DB Storage. My example include one part for native HTML (Chrome, Safari, Firefox) and other one for mb1 project which works into Iphone simulator.
Enjoy!
liortulipMemberSorry, this is probably an idiotic question, but how do you launch the test center with that bar on the top (the one with tools)? I cannot find it anywhere. Thanks!
support-octavioMemberHi,
As of MobiOne 2.5 the Test Center has been deprecated and has been replaced with a more advanced Mobile Web Simulator. You can learn more about it here: https://www.genuitec.com/mobile/docs/mobile_simulator/mobile_simulator.html
merhebmMemberHi All
how can i access and use this “local storage inspector” that was available in the old version of mobione, while now i am using version 2.6 with “Mobile web simulator”.
if this feature is not available anymore, can you please give me a code example , simple one since i am not a programer, on how to create, write and read from local data store for native mobile app ?
Thanks
MARC
Brandon BatieMemberHere is a more detailed document on using the developer tools and inspecting the local storage:
merhebmMemberThanks Brandon
is this data stored in the Web SQL demo, preserved in case I close the native App, or is it reset each time I open the application and close it ?
can i create for each ID line , multiple values ? or a sort of array ?Thanks
Brandon BatieMemberLocal storage is stored on the device and will stay until the app is uninstalled or the local storage is cleared, which makes it pretty good for storing data.
The basis of local storage is pretty simple, a key and a value. But, the value can be used to store a variety of data, a single string to complete arrays. So it really depends on what you are storing and how you plan to access it.
If you can give me a few more details about what you are trying to do maybe I can see if I have a sample I can post for you.
merhebmMemberHello Brandon
I have made it easy for you, I built a simulation of my project with .mobi files and a readme file to explain to you what I want to do in my real project.
I appreciate if you can grant me permission to attachment so that i share it with you or else tell me how can i share.
many thanks for your usual and speedy support.
BR
merhebm
support-michaelKeymaster@merhebm
I believe the forums have an attachment limit of 1M or sor. The quickest way is to send an archive of the project to brandon’s attention at
support at genuitec dot com
or
alternatively use something like free https://www.wetransfer.com/ -
AuthorPosts