问题
When I played with the sample Using_JSONStore, I always tested WL.JSONStore=="undefined" on Android Mobile Browser Simulator or on a Android Virtual Device Emulator, or on my real Android device (Android version 2.3.5). How to enable the WL.JSONStore feature in the Worklight project? Thanks.
回答1:
In Worklight 5.0.6.x, JSONStore is always part of the Android and iOS environments, so it is always present. There is nothing to 'enable'.
What you want to do, is perhaps initialize it, that is - use the init method. Is that what you're after?
Please also consult with the JSONStore documentation.
回答2:
Enabling JSONStore Since IBM® Worklight® V6.0, JSONStore is an optional feature. To use JSONStore, you must take steps to enable it.
About this task To use JSONStore you must enable it by modifying the application-descriptor.xml file. Procedure Using the Application Descriptor Editor, open the file application-descriptor.xml Click the Design tab. Under Overview, expand Application [your application's name]. Click Optional Features. Click Add. Select JSONStore. Click Ok. Under Worklight Project, right-click the folder titled with your application name. Select Run As…. Click Run on Worklight Development Server.
http://www-01.ibm.com/support/knowledgecenter/api/content/nl/it/SSZH4A_6.1.0/com.ibm.worklight.dev.doc/devref/t_enabling_jsonstore.html
来源:https://stackoverflow.com/questions/17144301/how-to-enable-wl-jsonstore-in-worklight-project