ConnectyCube / android-messenger-app

Chat and voice / video calling app using ConnectyCube
https://connectycube.com
Apache License 2.0
52 stars 23 forks source link

User Issue #106

Closed tayyabalibasra closed 2 years ago

tayyabalibasra commented 2 years ago

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

TatankaConCube commented 2 years ago

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) {

    });
TatankaConCube commented 2 years ago

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

tayyabalibasra commented 2 years ago

ok waiting

TatankaConCube commented 2 years ago

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) {

            }
        })
tayyabalibasra commented 2 years ago

ok thanks

TatankaConCube commented 2 years ago

please check and close the ticket if your issue was resolved

tayyabalibasra commented 2 years ago

great bro