Subscribe rss
Blog categories
All | Backendless features
Feature 52: Fetching application’s user objects
March 1, 2015 by markpiller

The user accounts of a Backendless app are managed by the User Service. However, the data for the accounts is stored in the Data Service storage. As a result, you can use the Data Service API to load the user objects for an application. Moreover, any search queries, paging and sorting supported by the Data Service API apply directly to fetching the user accounts.

Consider an application with the following user accounts:
user-accountsThe sample below demonstrates the loading of all user objects in an app. It would be a matter of modifying the search query parameters to enable sorting or additional data filtering (i.e. loading with an SQL query, aka the “where clause”).

Asynchronous sample (Android and Plain Java):

Synchronous sample (Plain Java only):

The program output is:

Asynchronous sample:

Synchronous sample:

Asynchronous sample:

Synchronous sample:

Notice the code uses the find() method from the Data Service API. It is important to understand that the demonstrated approach and all its variations are applicable to the Users table in Backendless. I plan to demonstrate many of them in the coming articles.


Share this post
Tweet about this on TwitterShare on FacebookGoogle+