Skip to content
This repository was archived by the owner on Apr 5, 2020. It is now read-only.
This repository was archived by the owner on Apr 5, 2020. It is now read-only.

Message Listening does not working. #2

Description

@sadiqodho
  boolean run = true;

    Client.init("/usr/bin/python", "JavaWhatsApp/yowsup/yowsupclient.py");

    while (run) {

        Client.ListenIncomingMessages();

        ArrayList<Contact> unreaden = Client.getUnseenContacts();

        if (!unreaden.isEmpty()) {

            for (Contact ur : unreaden) {

                String from = ur.getNumber();
                String text = ur.getUnseenMessage();

                System.out.println(from + "-" + text);

                if (text.equals("stop")) {
                    Client.killit();
                    run = false;
                    break;
                }
            }

        } else {
            System.out.println("There are not new messages");
        }
    }

When I try to send message from my Whatsapp to device. there is no message received. But yowsup python api does work fine. Anyone to find out reason.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions