You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I'm trying to use the .newConnection(phonenumber) method to connect more than one number, but when I execute the unregistered method the library does not create the image containing the Qrcode...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to use the .newConnection(phonenumber) method to connect more than one number, but when I execute the unregistered method the library does not create the image containing the Qrcode...
How should I proceed?
Below is the code I am using:
LocalDateTime agora = LocalDateTime.now();
ConnectionBuilder conexao = Whatsapp.webBuilder();
WebOptionsBuilder builder = conexao.newConnection(5548999999999L);//omitting real number
builder.name("Name API");
Whatsapp whats = builder.unregistered(QrHandler.toFile(Path.of("E:\.Temporários\QrCode\" +
agora.toString().replace(":", "").replace(".", "") + ".jpeg"), ToFileConsumer.toTerminal()));
whats.addLoggedInListener(api -> System.out.printf("Connected: %s%n", api.store().privacySettings()));
whats.addDisconnectedListener(reason -> System.out.printf("Disconnected: %s%n", reason));
whats.addNewChatMessageListener(message -> System.out.printf("New message: %s%n", message.toJson()));
whats = whats.connect().join();
Beta Was this translation helpful? Give feedback.
All reactions