The SAP Mobile Platform Storage API allows you to store structured data on the client side.
You can also use these functions as an arbitrary key or value storage mechanism. Keys are strings, and any string (including the empty string) is a valid key. Keys cannot be duplicated in the same Hybrid App package. Values are also strings and values can be duplicated in the same Hybrid App package. Keys and values can contain multi-byte characters.
SUPStorage can span multiple screens in the Hybrid App, and lasts beyond the current session. This allows the storage of user data on the client, such as entire user-authored documents.
Using platform-specific mechanisms, the items stored using the SUPStorage API are encrypted according to the particular platform policies:
Platform | Encryption policy |
---|---|
BlackBerry | PersistentStore, which adheres to the Content Protection BES IT policy |
Android | Encrypted before storing into the SQLite database |
iOS | Stored in SQLite Encryption Extensions database |
Windows Mobile | Unencrypted SQLite—security is deferred to Afaria Security Manager |
The amount of data that can be stored on the client is limited only to the available storage space on the particular platform:
Platform | Data storage |
---|---|
BlackBerry | Amount of free PersistentStore. |
iOS and Android | Amount of free file system for the SQLite database, and/or the SQLite database size limit |
Windows Mobile | Amount of free file system, and the SQLite database size limit. |
Limitations
The amount of data that you can retrieve and return to the JavaScript space when using the SUPStorage API is limited to the JavaScript size limitation as established for each platform. See the topic AttachmentViewer and Image Limitations in SAP Mobile WorkSpace - Hybrid App Package Development.