Kinvey (Android) - I need all users list

2019-09-20 21:15发布

问题:

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.

回答1:

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.



标签: list kinvey