-1

How can I retrieve the entire list of users from kinvey?

I tried to use:

User[] users = myClient.user().retrieveBlocking(new Query()).execute(); 

but my application crashed.

Julien Marrec
  • 11,605
  • 4
  • 46
  • 63
  • 5
    your question needs more information. how did it crash? any error messages? the better you specify your problem, the easier it is for SO to help. – matias elgart Dec 02 '16 at 17:47

1 Answers1

0

The user().retrieve will get just the logged-in user.

You cannot simply get a list of all users with the SDK. This would be a security risk. But, you might want to be able to look at the following:

a. User Discovery http://devcenter.kinvey.com/android/guides/users#lookup

b. Business Logic, where you can get a list of all users as a Custom Endpoint, then return that list to the caller. In that Endpoint, you can use "collectionAccess" to the "user" collection to get to that data.

Ivo Janssen
  • 476
  • 3
  • 9