Kinvey(Android)-我需要所有用户列表 [英] Kinvey (Android) - I need all users list
问题描述
如何从kinvey中检索整个用户列表?
How can I retrieve the entire list of users from kinvey?
我尝试使用:
User[] users = myClient.user().retrieveBlocking(new Query()).execute();
但是我的应用程序崩溃了.
but my application crashed.
推荐答案
user().retrieve将仅获得已登录的用户.
The user().retrieve will get just the logged-in user.
您不能简单地使用SDK获得所有用户的列表.这将带来安全风险.但是,您可能希望能够查看以下内容:
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.用户发现 http://devcenter.kinvey.com/android/guides/users#lookup
b.业务逻辑,您可以在其中获取所有用户的列表作为自定义端点,然后将该列表返回给调用方.在该端点中,您可以对用户"集合使用"collectionAccess"来获取该数据.
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.
这篇关于Kinvey(Android)-我需要所有用户列表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!