Here is My code snippet:

Uri mUri = Uri.parse("smsto:+9876543210");

Intent mIntent = new Intent(Intent.ACTION_SENDTO, mUri);

mIntent.setPackage("com.whatsapp");

mIntent.putExtra("sms_body", "The text goes here");

mIntent.putExtra("chat",true);

startActivity(mIntent);


I'm trying to send a whatsapp directly to a specific phone number doing something

like this from a webapp using html5, jquery mobile & php:

<a href="whatsapp://send?abid=phoneNumberHere&text=Hello%20World!">Send Whatsapp</a>

All this does is

I’m a long-time user of Tasker and have been using the great WhatsTasker plugin to automatically reply to (or send) whatsapp messages.

This has always needed root, and its well-documented,

just insert your message into the Whatsapp db appropriately and restart whatsapp,

then Whatsapp will detect the message not having been sent and will send it.

However, I just got a new phone (and also already own a Sony Smartwatch 2) and found this cool app [1]

which emulates Android Wear’s look on the SW2. Including the ability to reply to a Whatsapp post. Without root.

Does anyone know how the author of this app did it? The app was released Aug 5th

so I’m sure its related to new functionality in Whatsapp (a quick google shows that that was also around the time

Whatsapp updated for Android Wear auto-reply functionality.

I have asked the author via email but not (yet) received a reply.

I'm thinking of installing Tasker on my phone, but I don't want to root it. Is it worth my while?

What Tasker tasks require root access? What can it do without root access?

Here are some examples:

  • I would like to turn on the GPS whenever I start certain apps (various driving directions apps, for instance), and turn it off when I exit them. I understand that apps can't turn on the GPS (otherwise the apps in question would do it themselves instead of directing me to the settings). Tasker claims to be able to do that. Does it need root for that?

  • I remember seeing somewhere (lifehacker maybe?) that Tasker can disable the lock screen based on location, such as when I get home, and turn it off when I leave. Can it do that? Does it need root access for that?

The simple answer is that it requires root to do things that would require root if they weren't automated by Tasker

and you were doing them manually.

Tasker is irrelevant.

Edit:

Turning on/off GPS does not require root.

Apps must be able to do it, because Power Widget can.

As for the lock screen, I think what you read must have actually referred to the keyguard (the "swype to unlock" screen).

The phone is not locked the same way as it is with a pattern/password when the keyguard is on;

it's just to prevent accidentally keypresses, not for security. Tasker can disable the keyguard.

Actually, GPS turn on / off does require root. The Power Widget thing just takes you to the settings page

I'm not sure what you're talking about, Tasker does not require root for any of its features.

This simple concept profoundly extends your control of your Android device and it's capabilities,

without the need for 'root' or a special home screen.

there are some tasks in tasker which need root privileges, i.e. toggle 2g only / 2g and 3g.

This answer is just wrong. There's lots (I would say most of the useful ones) of features

it can't do without root. toggling GPS, DPAD, set CPU frequency etc.)

I was in the same boat as you. Wanted tasker, didn't want to root my app.

After downloading it, I did it find it fairly limiting without a root because as Matthew Read said,

it basically only allows you to do the things that any other app could do.

So unless your requirement are some niche thing that you wanted, there's probably an app that does it for you anyway.

Some of the things that can't be done without a root include

  • Turning GPS on / off
  • Toggling 3g on / off
  • Setting CPU speed
  • DPAD (allows you to script the phone like it was being used)
  • turn the screen on
  • reboot the phone

I mainly got Tasker as I thought I could optimize the battery life on my phone but without those settings, there's not that much I can really do.

Still worth the 2 bucks though, been great learning playing with it. And maybe down the line, I will go and root my phone.

EDIT - this answer is only for ICS and above. Not sure what it'd be if you were still on Gingerbread

I want to Send a message to multiple Whatsapp Contacts/Groups using "Tasker" with "WhatsTasker" plugin .

I tested my implementation to send SMS message to multiple contacts and it works well. But when I try to send message to whatsapp it sends the message only to the first index (Contact/Group)

Also, I have test this to send a personal message to 2 contacts but it sends the message only to first number

I tried to trim the "@s.whatsapp.net"/for contacts and "@g.us" for groups in 2 variables then add them inside whatstasker After the number -> Still sends to only first number

I thought it's because it's using root access and Toast message displays so I used "Wait" action for 10 seconds inside For loop after sending the message but still same thing only first contact will receive the message

did I miss something with my implementation?

this is my latest Task Description (Ignore A3 and A10)

SMS ()
A1: Variable Set [ Name:%msg To:Test tasker Do Maths:eek:ff Append:eek:ff ]
A2: Variable Set [ Name:%telephones To:-,- Do Maths:eek:ff Append:eek:ff ]
A3: Variable Set [ Name:%whatsappname To:@s.whatsapp.net Do Maths:eek:ff Append:eek:ff ]
A4: Variable Set [ Name:%whatsappgroup To:@g.us Do Maths:eek:ff Append:eek:ff ]
A5: Variable Split [ Name:%telephones Splitter:, Delete Base:eek:ff ]
A6: For [ Variable:%current Items::%telephones(#) ]
A7: WhatsTasker Send Message [ Configuration:ID: %telephones(%current)%whatsappgroup
Message: %msg Package:net.zhdev.whatstasker Name:WhatsTasker Send Message Timeout (Seconds): ]
A8: Wait [ MS: Seconds: Minutes: Hours: Days: ]
A9: [X] Send SMS [ Number:%telephones(%current) Message:%msg Store In Messaging App:eek:ff ]
A10: End For
Try increasing the Timeout (Seconds)
 
Before
I have been sending Whatsapp messages to two different Whatsapp groups once.
I will say it works about 90% of the time with or without delay in between the [Send Message] action
When it fails (~10% of the time), it send to the first group only.

Then
Then, I realise the default Timeout (Seconds): is 3. 
Changing the Timeout to 1 second definitely mess up the process and cause the rest of the [Send Message] action to fail.
However the first message will still be sent. (If the first [Send Message] is not given enough time to send, the rest of the [Send Message] action will fail too.)

Near future
Perhaps, the action didn't get the run finished within 3 seconds sometimes?
I am going increasing the Timeout to 15 seconds and see how it goes!

 

Send a WhatsApp Message programatically -- Tasker WhatsTasker的更多相关文章

  1. How to read out WhatsApp messages with Tasker and react on their content in real time

    http://technologyworkroom.blogspot.sg/2013/05/tasker-how-to-read-out-whatsapp.html Tasker can read o ...

  2. UiPath: Send SMTP Mail Message 发送带附件的邮件

    Tips:关于Hotmail的server和port的获取方式,请参考以下链接 https://support.office.com/en-us/article/Server-settings-you ...

  3. VirtualBox问题解决合集 - [drm:vmw_host_log [vmwgfx]] *ERROR* Failed to send host log message

    转载:https://blog.csdn.net/mychangee/article/details/104954262 问题描述:[drm:vmw_host_log [vmwgfx]] ERROR  ...

  4. send and recieve message with myself (python socket )

    # socket server import socket sk = socket.socket() sk.bind(("127.0.0.1",8082)) sk.listen() ...

  5. WhatsApp & Tasker for Android – Read & Write messages

    WhatsApp & Tasker for Android – Read & Write messages The requirement for the automation is ...

  6. Ultimate Guide to WhatsApp for Business 2019

    By Iaroslav Kudritskiy (Source: https://rocketbots.io/blog/the-ultimate-guide-to-whatsapp-business-a ...

  7. WhatsApp Group vs WhatsApp Broadcast for Business

    WhatsApp Group vs WhatsApp Broadcast for Business By Iaroslav Kudritskiy If you've read our Ultimate ...

  8. (HDU 5558) 2015ACM/ICPC亚洲区合肥站---Alice's Classified Message(后缀数组)

    题目链接 http://acm.hdu.edu.cn/showproblem.php?pid=5558 Problem Description Alice wants to send a classi ...

  9. Smack Message扩展,添加自定义元素(标签)经验分享

    Smack框架对XMPP协议进行了封装,从而方便与Openfire即时通信服务器做交互.说白了,Smack框架可以通过对象构造符合XMPP协议的XML字符串,避免手动拼接字符串. XMPP协议基本XM ...

随机推荐

  1. Python_oldboy_自动化运维之路_函数,装饰器,模块,包(六)

    本节内容 上节内容回顾(函数) 装饰器 模块 包 1.上节内容回顾(函数) 函数 1.为什么要用函数? 使用函数之模块化程序设计,定义一个函数就相当于定义了一个工具,需要用的话直接拿过来调用.不使用模 ...

  2. thinkphp模型创建

  3. Filebeat入门

    一.安装filebeat 简介 Beats 是安装在服务器上的数据中转代理. Beats 可以将数据直接传输到 Elasticsearch 或传输到 Logstash . Beats 有多种类型,可以 ...

  4. 开源的python机器学习模块

    1. Scikit-learn Scikit-learn 是基于Scipy为机器学习建造的的一个Python模块,他的特色就是多样化的分类,回归和聚类的算法包括支持向量机,逻辑回归,朴素贝叶斯分类器, ...

  5. Python输入/输出

    1.在python2.x中raw_input( )和input( ),两个函数都存在,其中区别为 raw_input( )---将所有输入作为字符串看待,返回字符串类型 input( )-----只能 ...

  6. ZCTF2015 pwn试题分析

    ZCTF的pwn赛题分析, PWN100 这道题与SCTF的pwn100玩法是一样的,区别在于这个要过前面的几个限制条件.不能触发exit(0).否则就不能实现溢出了. 依然是触发canary来lea ...

  7. wordpress 常用函数-wpdb类

    与数据库建立接口 WordPress为用户提供了一系列用于数据库操作的函数类——wpdb.Wpdb类建立在Justin Vincent编写并维护的ezSQL类的基础上. 使用须知 不可直接调用wpdb ...

  8. Eclipse+Tomcat+Axis2+ADT开发环境配置

    一.安装Eclipse和Tomcat 1.安装Eclipse: 2.解压缩安装apache-tomcat-6.0.41 3.tomcat配置环境变量(4个) TOMCAT_HOME     D:\An ...

  9. Java第三阶段学习(三、字符流、转换流)

    一.字节流读取中文时出现的问题: 文件中有中文时,用字节流读取会出现乱码的问题,因为一个中文为两个字节. 二.字符编码表 编码表:其实就是生活中字符和计算机二进制的对应关系表. 1.ascii: 一个 ...

  10. 【58沈剑架构系列】mysql并行复制优化思路

    一.缘起 mysql主从复制,读写分离是互联网用的非常多的mysql架构,主从复制最令人诟病的地方就是,在数据量较大并发量较大的场景下,主从延时会比较严重. 为什么mysql主从延时这么大? 回答:从 ...