Closed savox-326 closed 1 year ago
I mean when QR codes send while you not connected to your account how terminate connection
Use the disconnect method from the api
@Auties00 but if i have this on setup
whatsapp = Whatsapp.newConnection(createOptions()) .addLoggedInListener { -> successConnect() } .connect() .get()
and run
whatsapp.disconnect()
on other thread (for not blocking program) i got something about this "cannot invoke method disconnect() because whatsapp is null"
@Auties00 but if i have this on setup
whatsapp = Whatsapp.newConnection(createOptions()) .addLoggedInListener { -> successConnect() } .connect() .get()
and run
whatsapp.disconnect()
on other thread (for not blocking program) i got something about this "cannot invoke method disconnect() because whatsapp is null"
Use the api instance coming from the listener, the instance you are using will be unitialized
I mean when QR codes send while you not connected to your account how terminate connection