nikhilmuz / WhatsApp-Bulk-Sender

Send bulk messages right from your WhatsApp Android Client or WhatsApp Web
MIT License
243 stars 121 forks source link

Activity pauses when the number in csv is not found in the whatsapp contact list #13

Closed skdhruv closed 4 years ago

nikhilmuz commented 5 years ago

This bug I already have in mind and will be fixed soon. As of now, you have to click OK on the message received by the WhatsApp client. You may validate contacts via WhatsApp database at /data/data/com.whatsapp/[wa.db or msgstore.db]

chiaqf commented 5 years ago

Greetings, any update for now?

chiaqf commented 5 years ago

I observed that intent will not always open chat to strangers, how about implementing WhatsApp's click to chat feature instead of using intent?

Example : https://api.whatsapp.com/send?phone=

nikhilmuz commented 5 years ago

That doesn't allows to send additional information data like images and videos to be attached to messages which I intend to add later on. BTW you can add contact and sync to whatsapp in order to insure that the Conversation activities always opens for stranger.

On Tue, 19 Mar, 2019, 6:14 AM chiaqf, notifications@github.com wrote:

I observed that intent will not always open chat to strangers, how about implementing WhatsApp's click to chat feature instead of using intent?

Example : https://api.whatsapp.com/send?phone=

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/nikhilmuz/WhatsApp-Bulk-Sender/issues/13#issuecomment-474154813, or mute the thread https://github.com/notifications/unsubscribe-auth/ATNMF7McGVfku7Eo4OUEmX5ZIK5dTXopks5vYDLygaJpZM4Y8553 .

chiaqf commented 5 years ago

List nodes = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.whatsapp:id/send"); final List nodesback = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.whatsapp:id/back");

            for (AccessibilityNodeInfo nodeInfo : nodes) {
                if (nodeInfo != null) {
                    nodes.get(0).performAction(ACTION_CLICK);
                    Handler handler = new Handler();
                    handler.postDelayed(new Runnable() {
                        public void run() {
                            // Actions to do after 1 seconds
                            for (AccessibilityNodeInfo nodebackInfo : nodesback) {
                                if(nodebackInfo!=null){
                                    nodesback.get(0).performAction(ACTION_CLICK);
                                }
                            }
                        }
                    }, 1000);

                    break;
                }
            }

I managed to do this, performglobalaction don't seem to work all the time, so I perform click on the back button on top left corner of com.whatsapp.conversation UI

nikhilmuz commented 5 years ago

Thanks for the codes. I will look into it and update accordingly. Thanks again for showing interest in contributing to this repo.

On Wed, 20 Mar, 2019, 7:55 AM chiaqf, notifications@github.com wrote:

List nodes = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.whatsapp:id/send"); final List nodesback = getRootInActiveWindow().findAccessibilityNodeInfosByViewId("com.whatsapp:id/back");

        for (AccessibilityNodeInfo nodeInfo : nodes) {
            if (nodeInfo != null) {
                nodes.get(0).performAction(ACTION_CLICK);
                Handler handler = new Handler();
                handler.postDelayed(new Runnable() {
                    public void run() {
                        // Actions to do after 1 seconds
                        for (AccessibilityNodeInfo nodebackInfo : nodesback) {
                            if(nodebackInfo!=null){
                                nodesback.get(0).performAction(ACTION_CLICK);
                            }
                        }
                    }
                }, 1000);

                break;
            }
        }

I managed to do this

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/nikhilmuz/WhatsApp-Bulk-Sender/issues/13#issuecomment-474658800, or mute the thread https://github.com/notifications/unsubscribe-auth/ATNMF5G1KpV_RFhffxxYWsE5m8NqgXBsks5vYZwngaJpZM4Y8553 .

chiaqf commented 5 years ago

You're welcome, thanks for sharing these too. Glad to help

nikhilmuz commented 4 years ago

@chiaqf marked your concern as a new issue and I will rectify it separately meanwhile I am closing this issue after a PR resolving the concern of @skdhruv