The Telerik Platform product is retired.Learn more

Creating Data Items

Creating Data Items

The Backend Services Android SDK allows you to create a data item by instantiating an object and passing it to the Create() or CreateMultiple() methods.

All objects you pass to the methods must be defined according to the Everlive object model.

Single Item

Use the Create() method to create a new content type item. After the items are created, the server returns the newly generated IDs along with the CreatedAt date on the server. The values are automatically set to the objects you passed.

Book testBook = new Book();

Normally, you don't need to specify the item ID—a GUID will be generated for you. However, if you need to set a specific ID, such as when importing existing data from an external database, you can do that by simply passing it with the request. Your custom ID must meet the following conditions:

  • Must be unique inside the application
  • Must be a string

You can update system fields such as CreatedAt and CreatedBy. However, you can set them only after doing the following:

EverliveAppSettings everliveAppSettings = new EverliveAppSettings();

EverliveApp app = new EverliveApp(everliveAppSettings);
app.setAccessToken(new AccessToken("Masterkey", "your-master-key"));

Book testBook = new Book();

Multiple Items

List<Book> books = new ArrayList<Book>();
for (int i = 0; i &lt; 2; i++) {
   Book book = new Book();
   book.setTitle("Test title " + i);


Telerik Platform verifies fields marked as unique (IsUnique) just before creating each item. It keeps creating items until it reaches a duplicate value, after which it stops executing the request and returns an error. The rest of the items are not processed.

Contact us: +1-888-365-2779
Copyright © 2016-2018, Progress Software Corporation and/or its subsidiaries or affiliates. All rights reserved.