I want to search user on server by those:
val userSearchManager = UserSearchManager(connection)
for (service in userSearchManager.searchServices) {
if (BuildConfig.DEBUG) {
Log.d(TAG, "search with service: $service")
}
val searchForm = userSearchManager.getSearchForm(service)
val answerForm = searchForm.createAnswerForm()
answerForm.setAnswer("userAccount", true)
answerForm.setAnswer("Username", "admin")
val data = userSearchManager.getSearchResults(answerForm, service)
if (data != null) {
Log.i(TAG, data.toString())
}
}
It works in 4.3.0, But the method getSearchForm()
was removed in 4.4.6, so waht should I do if I still use 4.4.6?