Closed skdhruv closed 4 years ago
Greetings, any update for now?
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=
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 .
List
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
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 .
You're welcome, thanks for sharing these too. Glad to help
@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
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]