Back

CreateCloudStore

Hello World
Content:
Building APK
- Methods


The CloudStore component allows you to easily store and retrieve app data (as a simple or complex JSON object) from a cloud.

cld = app.CreateCloudStore( apiKey ) → app object: CloudStore

This is useful for game high scores, IOT sensor data storage etc. which should be shared across all user devices even if they're not in the same local network.
Also have look at the CloudStore Dashboard and API documentation

Note: This function is a premium feature. Please consider subscribing to Premium to use this feature and support DroidScript in its further development.


CloudStore has the following limitations:-

- once every 3 seconds max read/write
- 300 read/writes per day per file
- 3 files per user
- 3k max file size.


To sign up for your free CloudStore key, please contact support@droidscript.org
More files/space can be provided for a small fee

Note: CloudStore is still in beta, so don't rely on it to store any important data.

Building APK

If you decide to share your CloudStore app with someone else it is perfectly possible to build an APK of the app.

However, please be aware that the apiKey is included in plain text unless you obfuscate
your app
.
For extra security, you can split your key string into 2 or 3 parts (use obscurely
named global variables or functions) and put them in separate parts of your code, then
combine the parts only when making CloudStore API calls.

Methods

The following methods are available on the CloudStore object:

GetType() → String: “CloudStore”
all types
Object
String
String: mimetype
String: path to file ( “/absolute/...” or “relative/...” )
Object: { COMMAND }
Object: {data,error}
Object: {data,error}
Object: {data,error}
Object: {data,error}
Object: {error,name,folder,id,mimetype,size}
function( success, result, status )
function( error, result, status )
function( error, result, status )
function( success, result, status )
function( response )
cld.Batch
Batch method calls to be able to set all object's properties at once.
Note that you need to specify each parameter (use “” or null to leave some out)
Inherited methods can be called by appending an underscore to the function name (ie. txt.Batch({ SetBackColor_: [“red”] })
cld.Delete
Deletes a file in the cloud.
cld.GetType
Returns the control class name.
cld.List
Lists files of the cloud.
cld.Load
Loads data from the cloud.
cld.Merge
Merges an object with an already existing in the cloud.
cld.Save
Saves data in the cloud.
cld.SetDescription
Set a control description for accessibility
cld.Upload
Upload a file to the cloud.