{"id":4783,"url":"https://github.com/realtime-framework/RCTRealtimeStorageAndroid","last_synced_at":"2025-08-04T02:31:45.280Z","repository":{"id":57339439,"uuid":"43425754","full_name":"realtime-framework/RCTRealtimeStorageAndroid","owner":"realtime-framework","description":"Realtime Cloud Storage React Native SDK for Android","archived":false,"fork":false,"pushed_at":"2016-08-16T09:49:27.000Z","size":34,"stargazers_count":3,"open_issues_count":0,"forks_count":5,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-04T03:14:28.358Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/realtime-framework.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-09-30T09:59:10.000Z","updated_at":"2022-02-25T09:11:23.000Z","dependencies_parsed_at":"2022-09-16T13:00:36.156Z","dependency_job_id":null,"html_url":"https://github.com/realtime-framework/RCTRealtimeStorageAndroid","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRCTRealtimeStorageAndroid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRCTRealtimeStorageAndroid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRCTRealtimeStorageAndroid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realtime-framework%2FRCTRealtimeStorageAndroid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realtime-framework","download_url":"https://codeload.github.com/realtime-framework/RCTRealtimeStorageAndroid/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228587347,"owners_count":17941442,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:17:23.227Z","updated_at":"2024-12-07T09:31:00.705Z","avatar_url":"https://github.com/realtime-framework.png","language":"Java","readme":"#Realtime Storage SDK for React-Native Android\n\nRealtime Cloud Storage is a fully managed NoSQL database service based on Amazon DynamoDB that provides fast and predictable performance with seamless scalability.\n\nIf you are a developer, you can use Realtime Cloud Storage to create database tables that can store and retrieve any amount of data, and serve any level of request traffic.\n\n##Installation\n\n* Create a new react-native project. [Check react-native getting started](http://facebook.github.io/react-native/docs/getting-started.html#content)\n\n* Execute\n\n\t\t npm install --save react-native-realtimestorage-android\n\n* In `android/settings.gradle`\n\n\t\t...\n\t\tinclude ':react-native-realtime-storage-android'\n\t\tproject(':react-native-realtime-storage-android').projectDir = new File(settingsDir,'../node_modules/react-native-realtimestorage-android/reactnativestorageandroid')\n\n* In `android/app/build.gradle`\n\n\t\tandroid {\n\t\t    ...\n\n\t\t    packagingOptions {\n\t\t        exclude 'META-INF/DEPENDENCIES'\n\t\t        exclude 'META-INF/NOTICE'\n\t\t        exclude 'META-INF/LICENSE'\n\t\t    }\n\t\t    \n\t\t\t...\n\t\t}\n\n\t\tdependencies {\n\t\t\t...\n\t\t    compile project(':react-native-realtime-storage-android')\n\t\t}\n\n\t\t\n* Add `new RealtimeStoragePackage()` to the `getPackages()` method return list in `MainApplication.java`.\n\n\t\timport co.realtime.reactnativestorageandroid.RealtimeStoragePackage; //\u003c-- import\n\n\t\tpublic class MainActivity extends ReactActivity {\n\n\t\t    ...\n\n\t\t    @Override\n\t\t    protected List\u003cReactPackage\u003e getPackages() {\n\t\t        return Arrays.\u003cReactPackage\u003easList(\n\t\t                new MainReactPackage(),\n\t\t                new RealtimeStoragePackage() // \u003c-- add RealtimeStoragePackage object\n\t\t        );\n\t\t    }\n\t\t   \n\t\t    ...\n\n* Drag `RCTRealtimeStorageAndroid.js` to the root of your project.\n\n\n\n You are ready to go.\n\n\n## Example\n[This example](https://github.com/realtime-framework/StorageReactNativeTodo) uses the Realtime Cloud Storage React Native Android SDK to save and retrieve todo lists from the cloud. It can be also used with the other Realtime Todo samples, including the [on-line example](http://storage-public.realtime.co/samples/todo-lbl/index.html#/). \n\nData will be synced in real-time between devices and browsers.\n\n## Documentation\n\n###Importing RCTRealtimeCloudStorageAndroid to your project\n\n\timport realtime from './RCTRealtimeCloudStorageAndroid';\n\tvar RCTRealtimeCloudStorage = new realtime();\n\n\n####ProvisionLoad list\n\n* \"ProvisionLoad_READ\"\n\n* \"ProvisionLoad_WRITE\"\n\n* \"ProvisionLoad_BALANCED\"\n\n\n####ProvisionType list\n\n* \"ProvisionType_LIGHT\"\n \n* \"ProvisionType_MEDIUM\"\n\n* \"ProvisionType_INTERMEDIATE\"\n\n* \"ProvisionType_HEAVY\"\n\n* \"ProvisionType_CUSTOM\"\n\n\n####StorageDataType list\n\n* \"StorageDataType_STRING\"\n\n* \"StorageDataType_NUMBER\"\n\n\n####StorageEventType list\n\n* \"StorageEvent_PUT\"\n\n* \"StorageEvent_UPDATE\"\n\n* \"StorageEvent_DELETE\"\n\t\n\t\n## RCTRealtimeCloudStorageAndroid class reference\n\n###storageRef(aApplicationKey, aAuthenticationToken)\n\nInitialize the Storage Reference. Should be the first thing to do.\n\n**Parameters**\n\n* applicationKey -\nThe application key.\n\n\n* authenticationToken -\nThe authentication token.\n\n***Example***\n\n\tRCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\n###storageRefCustom(aApplicationKey, aAuthenticationToken, aIsCluster, aIsSecure, aUrl)\n\nInitialize the Storage Reference. Should be the first thing to do.\n\n**Parameters**\n\n* sSecure -\nDefines if connection use ssl.\n\n* url -\nThe url of the storage server.\n\n* applicationKey -\nThe application key.\n\n\n* isCluster -\nSpecifies if url is cluster.\n\n* authenticationToken -\nThe authentication token.\n\n***Example***\n\n\tRCTRealtimeCloudStorage.storageRefCustom('ApplicationKey', 'AuthenticationToken', true, true, 'Url')\n\t\n\n###getTables(success:Function, error:Function)\n\nRetrieves a list of the names of all tables created by the user's subscription.\n\n**Parameters**\n\n* success -\nThe block object to call once the values are available. The function will be called with a table snapshot as argument, as many times as the number of tables existent.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.getTables(function(success){\n\t\tconsole.log('success: ' + success);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###table(tableName)\n\nCreates new table reference\n\n**Parameters**\n\n* name -\nThe table name\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\n###isAuthenticated(aAuthenticationToken, success: Function, error: Function)\n\nChecks if a specified authentication token is authenticated.\n\n**Parameters**\n\n* authenticationToken -\nThe token to verify.\n\n* success -\nThe block object to call when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.isAuthenticated(function(success){\n\t\tconsole.log('success: ' + success);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###onReconnected(callback: Function)\n\nBind a block object to be called whenever the connection is reestablished.\n\n**Parameters**\n\n* callback -\nThe block object to call when the connection reestablish.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.onReconnected(function(){\n\t\tconsole.log('onReconnected');\n\t});\n\n\n###onReconnecting(callback: Function)\n\nBind a block object to be called whenever the connection is lost.\n\n**Parameters**\n\n* onReconnecting -\nThe block object to call when the connection is lost.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.onReconnecting(function(){\n\t\tconsole.log('onReconnecting');\n\t});\n\n###activateOfflineBuffering()\n\nActivate offline buffering, which buffers item's modifications and applies them when connection is reestablished. The offline buffering is activated by default.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.activateOfflineBuffering();\n\t\n###deactivateOfflineBuffering()\n\nDeactivate offline buffering, which buffers item's modifications and applies them when connection is reestablished. The offline buffering is activated by default.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tstorageRef.deactivateOfflineBuffering();\n\t\n\t\n##class tableRef\n\n### asc()\n\nDefine if the items are retrieved in ascending order.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.asc().getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###desc()\n\nDefine if the items are retrieved in descendant order.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.desc().getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###beginsWithString(item, value)\n\nApplies a filter to the table. Only objects with item that begins with the value will be in the scope. The item type is String.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.beginsWithString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###beginsWithNumber(item, value)\n\nApplies a filter to the table. Only objects with item that begins with the value will be in the scope. The item type is number.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.beginsWithNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###betweenString(item, beginValue, endValue)\n\nApplies a filter to the table. Only objects with item that are in range between beginValue and endValue will be in the scope. The item type is String.\n\n**Parameters**\n* item -\nThe name of property to filter.\n\n* beginValue -\nThe value of property indicates the beginning of range.\n\n* endValue -\nThe value of property indicates the end of range.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.betweenString('item', 'beginValue', 'endValue').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n\n###betweenNumber(item, beginValue, endValue)\n\nApplies a filter to the table. Only objects with item that are in range between beginValue and endValue will be in the scope. The item type is number.\n\n**Parameters**\n* item -\nThe name of property to filter.\n\n* beginValue -\nThe value of property indicates the beginning of range.\n\n* endValue -\nThe value of property indicates the end of range.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.betweenNumber('item', 0, 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###containsString(item, value)\n\nApplies a filter to the table. Only objects with item that contains the filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.containsString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###containsNumber(item, value)\n\nApplies a filter to the table. Only objects with item that contains the filter value will be in the scope. The item type is number.\n\n**Parameters**\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.containsNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###equalsString(item, value)\n\nApplies a filter to the table. Only objects with item that match the filter value will be in the scope. The item type is string.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.equalsString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###equalsNumber(item, value)\n\nApplies a filter to the table. Only objects with item that match the filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.equalsNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###greaterEqualString(item, value)\n\nApplies a filter to the table. Only objects with item greater or equal to filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.greaterEqualString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###greaterEqualNumber(item, value)\n\nApplies a filter to the table. Only objects with item greater or equal to filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.greaterEqualNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###greaterThanString(item, value)\n\nApplies a filter to the table. Only objects with item greater than filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.greaterThanString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\t\n###greaterThanNumber(item, value)\n\nApplies a filter to the table. Only objects with item greater than filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.greaterThanNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\t\n\n###lesserEqualString(item, value)\n\nApplies a filter to the table. Only objects with item lesser or equal to filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.lesserEqualString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###lesserEqualNumber(item, value)\n\nApplies a filter to the table. Only objects with item lesser or equal to filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.lesserEqualNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###lesserThanString(item, value)\n\nApplies a filter to the table. Only objects with item lesser than filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.lesserThanString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###lesserThanNumber(item, value)\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.lesserThanNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n\n###notContainsString(item, value)\n\nApplies a filter to the table. Only objects with item that does not contains the filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.notContainsString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###notContainsNumber(item, value)\n\nApplies a filter to the table. Only objects with item that does not contains the filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.notContainsNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###notEqualString(item, value)\n\nApplies a filter to the table. Only objects with item that does not match the filter value will be in the scope. The item type is String.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.notEqualString('item', 'value').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###notEqualNumber(item, value)\n\nApplies a filter to the table. Only objects with item that does not match the filter value will be in the scope. The item type is number.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.notEqualNumber('item', 10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###notNull(item)\n\nApplies a filter to the table. Only objects with item that is not null will be in the scope.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.notNull('item').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###Null(item)\n\nApplies a filter to the table. Only objects with item that is null will be in the scope.\n\n**Parameters**\n\n* item -\nThe name of property to filter.\n\n* value -\nThe value of property to filter.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.Null('item').getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###create(aPrimaryKey, aPrimaryKeyDataType, aProvisionType, aProvisionLoad, success: Function, error: Function)\n\nAdds a new table with primary key to the user's application. Take into account that, even though this operation completes, the table stays in a \"creating\" state. While in this state, all operations done over this table will fail with a ResourceInUseException.\n\n**Parameters**\n\n* success -\nThe block object to call when the operation is completed.\n\n* primaryKey -\nThe primary key\n\n* primaryKeyDataType -\nThe primary key data type (StorageDataType: StorageDataType_STRING or StorageDataType_NUMBER)\n\n* provisionLoad -\nThe ProvisionLoad (ProvisionLoad_READ, ProvisionLoad_WRITE or ProvisionLoad_BALANCED)\n\n* provisionType -\nThe ProvisionType (ProvisionType_LIGHT, ProvisionType_MEDIUM, ProvisionType_INTERMEDIATE, ProvisionType_HEAVY or ProvisionType_CUSTOM)\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.create('PrimaryKey', 'PrimaryKeyDataType', 'ProvisionType', 'ProvisionLoad', function(success){\n\t\tconsole.log('table ' + ((succes == true) ? 'created' : 'not created'));\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###createCustom(aPrimaryKey, aPrimaryKeyDataType, aSecondaryKey, aSecondaryKeyDataType, aProvisionType, aProvisionLoad, success: Function, error: Function)\n\nAdds a new table with primary and secondary keys to the user's application. Take into account that, even though this operation completes, the table stays in a \"creating\" state. While in this state, all operations done over this table will fail with a ResourceInUseException.\n\n**Parameters**\n\n* error -\nThe block object to call if an exception occurred.\n\n* primaryKey -\nThe primary key\n\n* provisionLoad -\nThe ProvisionLoad (ProvisionLoad_READ, ProvisionLoad_WRITE or ProvisionLoad_BALANCED)\n\n* primaryKeyDataType -\nThe primary key data type (StorageDataType: StorageDataType_STRING or StorageDataType_NUMBER)\n\n* success -\nThe block object to call when the operation is completed.\n\n* secondaryKeyDataType -\nThe secondary key data type (StorageDataType: STRING or NUMBER)\n\n* secondaryKey -\nThe secondary key\n\n* provisionType -\nThe ProvisionType ('ProvisionType_LIGHT', 'ProvisionType_MEDIUM', 'ProvisionType_INTERMEDIATE', 'ProvisionType_HEAVY' or 'ProvisionType_CUSTOM')\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.createCustom('PrimaryKey', 'PrimaryKeyDataType', 'SecondaryKey', 'SecondaryKeyDataType', 'ProvisionType', 'ProvisionLoad', function(success){\n\t\tconsole.log('table ' + ((succes == true) ? 'created' : 'not created'));\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###del(success: Function, error: Function)\n\nDeletes a table and all of its items.\n\n**Parameters**\n\n* result -\nThe block object to call when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.del(function(success){\n\t\tconsole.log('table ' + ((succes == true) ? 'deleted' : 'not deleted'));\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###update(ProvisionType, aProvisionLoad, success: Function, error: Function)\n\nUpdates the number of operations per second and how they're distributed between read and write operations of a given table. Take into account that, even though this operation completes, the table stays in the \"updating\" state.\n\n**Parameters**\n\n* success -\nThe block object to call when the operation is completed.\n\n* provisionLoad -\nThe ProvisionLoad (ProvisionLoad_READ, ProvisionLoad_WRITE or ProvisionLoad_BALANCED)\n\n* provisionType -\nThe ProvisionType (ProvisionType_LIGHT, ProvisionType_MEDIUM, ProvisionType_INTERMEDIATE, ProvisionType_HEAVY or ProvisionType_CUSTOM)\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.update('ProvisionType', 'ProvisionLoad', function(success){\n\t\tconsole.log('table ' + ((succes == true) ? 'updated' : 'not updated'));\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###item(primaryKey)\n\nRetrieves the reference to the item matching the given key. (in case that table was created only with primary key)\n\n**Parameters**\n\n* primaryKey -\nThe primary key (If the primary key type is Number you have to convert it to String)\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('primaryKey');\n\n###itemCustom(primaryKey, secondaryKey)\n\nRetrieves the reference to the item matching the given pair of keys.\n\n**Parameters**\n\n* primaryKey -\nThe primary key (If the primary key type is Number you have to convert it to String)\n\n* secondaryKey -\nThe secondary key (If the primary key type is Number you have to convert it to String)\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.itemCustom('primaryKey', 'secondary');\n\n###getItems(itemSnapshot: Function, error: Function)\n\nGet the items of this table applying the filters if defined before, if not retrieves all items.\n\n**Parameters**\n\n* success -\nThe block object called for every item retrieved. The last call have nil as a parameter.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###push(aItem, success:Function, error: Function)\n\nStores an item in a table.\n\n**Parameters**\n\n* item -\nThe item to be stored (must contains primary key and secondary key if such exists)\n\n* success -\nThe block object to call when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.push(item, function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###limit(value)\n\nApplies a limit to this table reference confining the number of items to get.\n\n**Parameters**\n\n* limit -\nThe limit to apply.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.limit(10).getItems(function(item){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###meta(meta, success:Function, error: Function)\n\nRetrieves information about the table, including the current status of the table, the primary key schema and date of creation.\n\n**Parameters**\n\n* success -\nThe block object to call when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.meta(meta, function(success){\n\t\tconsole.log('item: ' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###name()\n\nReturn the name of the referred table.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar tableName = tableRef.name();\n\n###on(eventType, callback: Function)\n\nAttach a listener to run block object every time the event type occurs.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.on('eventType', function(item){\n\t\tconsole.log('event trigged');\n\t});\n\n###onCustom(eventType, aPrimaryKeyValue, callback: Function)\n\nAttach a listener to run block object every time the event type occurs for items with specific primary key.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.onCustom('eventType', 'PrimaryKeyValue', function(item){\n\t\tconsole.log('event trigged');\n\t});\n\n###off(eventType)\n\nRemove an event handler for a specific selector.\n\n**Parameters**\n\n* eventType -\nThe type of the event to remove ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.off('eventType');\n\n###offCustom(eventType, aPrimaryKey)\n\nRemove an event handler for all block objects for a specific event type for a specific primary key.\n\n**Parameters**\n\n* eventType -\nThe type of the event to remove (StorageEventType: StorageEvent_PUT, StorageEvent_UPDATE or StorageEvent_DELETE)\n\n* primaryKey -\nThe primary key of objects of interested.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.offCustom('eventType', 'PrimaryKey');\n\n###once(eventType, callback: Function)\n\nAttach a listener to run block object only once when the event type occurs.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen (StorageEventType: StorageEvent_PUT, StorageEvent_UPDATE or StorageEvent_DELETE)\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.once('eventType', function(item){\n\t\tconsole.log('event trigged');\n\t});\n\n###onceCustom(eventType, aPrimaryKey, callback: Function)\n\nAttach a listener to run block object only once when the event type occurs for items with specific primary key.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen (StorageEventType: StorageEvent_PUT, StorageEvent_UPDATE or StorageEvent_DELETE)\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n* primaryKey -\nThe primary key of objects of interested.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.onceCustom('eventType', 'PrimaryKey', function(item){\n\t\tconsole.log('event trigged');\n\t});\n\n###enablePushNotifications()\n\nEnables Push Notifications for the table reference\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.enablePushNotifications();\n\n###disablePushNotifications()\n\nDisables Push Notifications for the table reference\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\ttableRef.disablePushNotifications();\n\n##class itemRef\n\n###del(success: Function, error: Function)\n\nDeletes an item specified by this reference.\n\n**Parameters**\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.del(function(success){\n\t\tconsole.log('item' + ((success == true)? 'deleted' : 'not deleted');\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###get(success: Function, error: Function)\n\nGets an item snapshot specified by this item reference.\n\n**Parameters**\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.get(function(item){\n\t\tconsole.log('item' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###set(attributes, success: Function, error: Function)\n\nUpdates the stored item specified by this item reference.\n\n**Parameters**\n\n* attributes -\nThe new properties of item to be updated.\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.set(attributes,function(item){\n\t\tconsole.log('item' + item);\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###incr(property, value, success:Function, error:Function)\n\nIncrements a given attribute of an item by default to 1. If the attribute doesn't exist, it is set to zero before the operation.\n\n**Parameters**\n\n* property -\nThe name of the item attribute.\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.incr('property', 10, function(success){\n\t\tconsole.log('item' + ((success == true)? 'incremented' : 'not incremented');\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###incrCustom(property, success:Function, error:Function)\n\nIncrements a given attribute of an item. If the attribute doesn't exist, it is set to zero before the operation.\n\n**Parameters**\n\n* property -\nThe name of the item attribute.\n\n* value -\nThe number to add. Defaults to 1 if invalid.\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.incrCustom('property', function(success){\n\t\tconsole.log('item' + ((success == true)? 'incremented' : 'not incremented');\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###decrValue(property, value, success:Function, error:Function)\n\nDecrements a given attribute of an item. If the attribute doesnâ€™t exist, it is set to zero before the operation.\n\n**Parameters**\n\n* property -\nThe name of the item attribute.\n\n* value -\nThe number to add. Defaults to 1 if invalid.\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.decrValue('property', 10, function(success){\n\t\tconsole.log('item' + ((success == true)? 'decremented' : 'not decremented');\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###decrCustom(property, success:Function, error:Function)\n\nDecrements a given attribute of an item by default to 1. If the attribute doesnâ€™t exist, it is set to zero before the operation.\n\n**Parameters**\n\n* property -\nThe name of the item attribute.\n\n* success -\nThe block object to call with the snapshot of affected item as an argument, when the operation is completed.\n\n* error -\nThe block object to call if an exception occurred.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.decrCustom('property', function(success){\n\t\tconsole.log('item' + ((success == true)? 'decremented' : 'not decremented');\n\t},\n\tfucntion(error){\n\t\tconsole.log('error: ' + error);\n\t});\n\n###on(eventType:String, callback: Function)\n\nAttach a listener to run block object every time the event type occurs for this item.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.on('eventType', function(){\n\t\tconsole.log('event triggred');\n\t});\n\n###off(eventType:String)\n\nRemove an event handler for all block objects for a specific event type for this item.\n\n**Parameters**\n\n* eventType -\nThe type of the event to remove ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.off('eventType');\n\n###once(eventType:String, callback: Function)\n\nAttach a listener to run block object only once when the event type occurs for this item.\n\n**Parameters**\n\n* eventType -\nThe type of the event to listen ('StorageEventType': 'StorageEvent_PUT', 'StorageEvent_UPDATE' or 'StorageEvent_DELETE')\n\n* callback -\nThe block object which is called with the snapshot of affected item as an argument.\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.once('eventType', function(){\n\t\tconsole.log('event triggred');\n\t});\n\n###enablePushNotifications()\n\nEnables Push Notifications for item reference\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.enablePushNotifications();\n\n###disablePushNotifications()\n\nDisables Push Notifications for item reference\n\n***Example***\n\n\tvar storageRef = RCTRealtimeCloudStorage.storageRef('ApplicationKey', 'AuthenticationToken');\n\tvar tableRef = storageRef.table('table name');\n\tvar itemRef = tableRef.item('PrimaryKey');\n\titemRef.disablePushNotifications();","funding_links":[],"categories":["Components"],"sub_categories":["Integrations"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2FRCTRealtimeStorageAndroid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtime-framework%2FRCTRealtimeStorageAndroid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtime-framework%2FRCTRealtimeStorageAndroid/lists"}