Chat SDK Android
v2
Title
Message
Create new category
What is the title of your new category?
Edit page index title
What is the title of the page index?
Edit category
What is the new title of your category?
Edit link
What is the new title and URL of your link?
Support Rx Java
Copy Markdown
Open in ChatGPT
Open in Claude
Most of APIs from Qiscus Chat SDK are using RxJava, but no worry, it's easy to use RxJava method. You just need to call subscribe() after you call the method. The main advantage of using RxJava is easiness of creating asynchronous method. You just need to add subscribeOn() where its thread will be used to run the task and observeOn() where its thread will be used to deliver result. To learn more about RxJava you can visit this page. This is an example on how to use RxJava method from QiscusApi.
For example get a Nonce:
Java
QiscusApi.getInstance().requestNonce();To execute it, you can call it like this:
Java
QiscusApi.getInstance().requestNonce() .subscribeOn(Schedulers.io()) // need to run this task on IO thread .observeOn(AndroidSchedulers.mainThread()) // deliver result on main thread or UI thread .subscribe(qiscusNonce -> { // on success }, throwable -> { // on error });But if you don't want to use Rx Java you can use QiscusRxExecutor, for example:
Java
x
QiscusRxExecutor.execute(QiscusApi.getInstance().requestNonce(), new QiscusRxExecutor.Listener<QiscusNonce>() { @Override public void onSuccess(QiscusNonce qiscusNonce) { // on success } @Override public void onError(Throwable throwable) { // on error }});Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard
Last updated on
Was this page helpful?
Next to read:
UserQiscus Technology
Discard Changes
Do you want to discard your current changes and overwrite with the template?
Archive Synced Block
Message
Create new Template
What is this template's title?
Delete Template
Message