Topic
  • 2 replies
  • Latest Post - ‏2012-07-16T08:08:41Z by SystemAdmin
CodeHunter
CodeHunter
6 Posts

Pinned topic how does work support for SQLite database on the devices with WL API?

‏2012-07-15T15:56:32Z |
My doubt is about the support for the SQLite on worklight API, when I develop an app how I can access the SQLite on the device?

How can I manage this base with worklight, as this base is local on the device, we do not need to write an adapter, then how it's be done? I have to do native code to access or in the worklight API had some support to make this cross-plataform?
and about the administration of this DB, how can be done with Worklight?

Tks in advanced
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: how does work support for SQLite database on the devices with WL API?

    ‏2012-07-15T19:00:25Z  
    While I am not an expert in Worklight, you should be able to code any Android or iOS specific things using the native language to the platform (Java or Objective-C) and store them in your Environment folders inside the apps > appName > whateverEnviroment.

    While this second issue is way out of scope of this forum, there are normally very limited reasons to use SQLite (IMO). If you are going to be storing a ton of data, a mobile phone with 8GB is probably not the place to do it. If you are storing just a bit of data locally, SharedPreferences, serialization, POJO frameworks, etc. are available. Storing locally does not allow your users to access this data in another device, moving your app to another device becomes a pain.

    Ralph Pina
  • SystemAdmin
    SystemAdmin
    2327 Posts

    Re: how does work support for SQLite database on the devices with WL API?

    ‏2012-07-16T08:08:41Z  
    Worklight API does not support SQLite, but since Workligth comes with PhoneGap you can use the PhoneGap API for Storage.
    See: http://docs.phonegap.com/en/1.9.0/cordova_storage_storage.md.html#Storage