Solution for sending Whatsapp via SQLite ' INSERT into '

Source: Internet
Author: User

I use the something similar but the thought I ' d mention this ' bug ' that can happen:
When you INSERT the '%wa_message ' into ' data ', the bear on mind your typed message would replace%wa_message.
If that typed message contains an apostrophe, your message won ' t send.
Why?
The apostrophe effectively closes ' data ' insert and the rest of the text isn ' t understood by SQLite.
Examples
' I ' m not the going to work '-won ' t work because only ' I ' would be the inserted into data,
SQLite won ' t know-do with M don't going to work '
' im not going to work '-on the other hand would work!

' This'll work , won ' t it ' -won ' t work because of the apostrophe, the text t it ' would be ' is left over and Cause an error
' This'll work , wont it ' -would work

So is careful with apostrophes and sqlite WhatsApp messages!
(This "bug" took me AGES to work out!)


On Sunday, September 16:17:01 utc+1, Amos Wong wrote:yo everyone!
I found this from pockable:http://www.pocketables.com/forum/showthread.php?t=11947 which leads me to a Spanish forum:ht tp://www.htcmania.com/showthread.php?p=8993462
Origin: pepelolo38
Since part of the commands is in Spanish, I thought of recreating them my Tasker [中文版] and share it here.

A3 ~ A9 Below is copied and modified from the original source.

For the task, I use

    • SQLite Installer
    • Rooted Galaxy nexus-android 4.1
    • Whatsapp v2.11.23


Send Whatsapp (491)
Run Both Together
A1:variable Set [name:%nummsg to:%arcomm do Maths:off Append:off]
A2:variable Split [name:%nummsg splitter:[}{] Delete Base:off]
A3:variable Set [name:%wa_number to:%nummsg1 do Maths:off Append:off]
A4:variable Set [name:%wa_key_id to:%times do Maths:off Append:off]
A5:variable Set [name:%wa_message to:%nummsg2 do Maths:off Append:off]
A6:variable Set [Name:%wa_timestamp to:%timems do Maths:off Append:off]
A7:variable Set [Name:%wa_received_timestamp to:%timems do Maths:off Append:off]
A8:run Shell [command:sqlite3/data/data/com.whatsapp/databases/msgstore.db] INSERT into messages (Key_remote_jid, key _from_me, Key_id,status, Needs_push, data, timestamp, Media_url, Media_mime_type, Media_wa_type, Media_size, Media_name , latitude, longitude, thumb_image, Remote_resource, Received_timestamp, Send_timestamp, Receipt_server_timestamp, Receipt_device_timestamp, Raw_data, Media_hash, Recipient_count, Media_duration, origin) VALUES ('%[email protected] ', 1, '%wa_key_id-1 ', 0,0, '%wa_message ',%wa_timestamp, ', ', ' 0 ', 0, ', 0.0,0.0, ', ',%wa_received_timestamp,-1,-1,- 1, 0, ', 0,0,0); Timeout (Seconds): 0 Use Root:on Store Output in:store Errors in:store Result in:]
A9:kill App [App:whatsapp use Root:on]


Description


A1 ~ A2:
For processing message received from Autoremote by JOAOMGCD [Ignore If you don ' t use it]
A3 ~ a7:setting up necessary variables
a8:the command to insert data into msgstore.db
A9:on My phone, this action was required for Whatsapp to send the message.
However, it doesn ' t seem to exit WhatsApp (My WhatsApp would just to blank and come back again).

Note:
On my phone

      • It takes 30~40 seconds to send a message when my screen is off.
      • 10~12 seconds when Whatsapp is opened.
      • The message is not shown in Whatsapp ' s homepage. (It's shown in the conversation)
      • The entire task takes seconds to run.

Solution for sending Whatsapp via SQLite ' INSERT into '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.