ConnectyCube/android-messenger-app

User Issue

tayyabalibasra opened this issue · 7 comments

hi sir i have question in your sdk have a asset file which contain static users list
but i did not use this file but i want to fetch all users which api you recomended i already use getuserbyNumber(),getUserbyemail(),getUserById() but these api did not return all user how can i get all user can you explain

you can use this snippet for getting all users with pagination, the maximum number of items per page is 100.

GetUsersQuery.byFilter(null, null, {'page': 1, 'per_page': 10})
    .perform()
    .then((pagedResult) {

    }).catchError((onError) {

    });

sorry, I provided example for Flutter))) will update soon

ok waiting

there example on the Kotlin:

        val pagedRequestBuilder = PagedRequestBuilder().apply {
            page = 1
            perPage = 50
        }
        ConnectycubeUsers.getUsers(pagedRequestBuilder).performAsync(object :
            EntityCallback<ArrayList<ConnectycubeUser>> {
            override fun onSuccess(users: ArrayList<ConnectycubeUser>, args: Bundle) {

            }

            override fun onError(error: ResponseException) {

            }
        })

ok thanks

please check and close the ticket if your issue was resolved

great bro