Google Groups

Re: Whatsapp


Andrea Z. Aug 10, 2012 2:29 AM
Posted in group: Tasker
thanks, it works good and it's really nice to study... i will surely learn something more on tasker.
What conditions you use to launch the profile? Notify from whatsapp? I also see there is some encoding issue, italian letters like à è ì are transformed in some wrong way

Il giorno venerdì 10 agosto 2012 11:21:44 UTC+2, Oon-Ee Ng ha scritto:

Please note, you'll need root and secure settings

On 10 Aug 2012 17:21, "Oon-Ee Ng" <ngoone...@gmail.com> wrote:

Here it is =)

Get Whatsapp Details (134)
A1: Variable Clear [ Name:%WHATSAPP_MSG Pattern Matching:Off ]
A2: Variable Clear [ Name:%WHATSAPP_NAME Pattern Matching:Off ]
A3: Variable Clear [ Name:%WHATSAPP_ID Pattern Matching:Off ]
<Get whatsapp message>
A4: Run Shell [ Command:sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select data from messages WHERE key_from_me='0' ORDER BY _id DESC LIMIT 1;" Timeout (Seconds):0 Use Root:On Store Result In:%WHATSAPP_MSG ]
<Get whatsapp sender id part 1>
A5: Run Shell [ Command:sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select remote_resource from messages WHERE key_from_me='0' ORDER BY _id DESC LIMIT 1;" Timeout (Seconds):0 Use Root:On Store Result In:%WHATSAPP_ID ]
A6: If [ %WHATSAPP_ID ~ +WHATSAPP_ID ]
A7: Variable Clear [ Name:%WHATSAPP_ID Pattern Matching:Off ]
<Get whatsapp sender id part 2>
A8: Run Shell [ Command:sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select key_remote_jid from messages WHERE key_from_me='0' ORDER BY _id DESC LIMIT 1;" Timeout (Seconds):0 Use Root:On Store Result In:%WHATSAPP_ID ]
A9: End If
<Get whatsapp sender name>
A10: Secure Settings [ Configuration:Get Whatsapp Name (Root) Package:com.intangibleobject.securesettings.plugin Name:Secure Settings ]
A11: Wait Until [ MS:50 Seconds:0 Minutes:0 Hours:0 Days:0 ] If [ %WHATSAPP_NAME Is Set ]
A12: Variable Set [ Name:%WHATSAPP_NAME To:Unknown number Do Maths:Off Append:Off ] If [ %WHATSAPP_NAME ~ +WHATSAPP_NAME ]
A13: Flash [ Text:%WHATSAPP_NAME said %WHATSAPP_MSG Long:Off ]

On 9 Aug 2012 15:05, "Hussain Ali Nasser" <hussaina...@gmail.com> wrote:
Cheers mate!

On Thursday, 9 August 2012 13:55:42 UTC+8, Oon-Ee Ng wrote:
Yeah, I guess, not right now, am at work =)

On Thu, Aug 9, 2012 at 12:15 PM, Hussain Ali Nasser
<hussaina...@gmail.com> wrote:
> Can you please attach your xml file and share the task? :D
>
>
> On Tuesday, 7 August 2012 14:10:09 UTC+8, Oon-Ee Ng wrote:
>>
>> Decided to play around with this a bit, its actually quite simple.
>>
>> Get the sender ID from remote_resource in the messages table (if its a
>> group message) or key_remote_jid (if its not). Then you can take that
>> key and match it against the wa_contacts table, the display_name
>> column.
>>
>> So the sequence of sqlite commands goes something like (still in
>> testing):-
>> 1. sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select
>> remote_resource from messages WHERE key_from_me='0' ORDER BY _id DESC
>> LIMIT 1;"
>> 2. if the output is blank, go to 3, otherwise go to 4.
>> 3. sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select
>> key_remote_jid from messages WHERE key_from_me='0' ORDER BY _id DESC
>> LIMIT 1;"
>> 4. Save the output of either 1 or 3 to some variable %WHATSAPPID
>> 5. sqlite3 /data/data/com.whatsapp/databases/wa.db "select
>> display_name from wa_contacts WHERE jid='%WHATSAPPID';"
>>
>> Quite simple, really, once I read that whatsapp uses an SQL database.
>> Should be possible to write helper kid apps for whatsapp as well... if
>> I ever get the time.
>>
>> On Sat, Jul 28, 2012 at 6:08 PM, Andrea Z. <kro...@gmail.com> wrote:
>> > Works fine, but how to grab the sender name?
>> >
>> >
>> > Il giorno mercoledì 29 febbraio 2012 17:33:48 UTC+1, Dennis ha scritto:
>> >>
>> >> In case you're rooted you can get the last message you received via:
>> >> sqlite3 /data/data/com.whatsapp/databases/msgstore.db "select data
>> >> from messages WHERE key_from_me='0' ORDER BY _id DESC LIMIT 1;"
>> >> In the same folder there's a db holding the name to the cryptic
>> >> key_remote_jid; somehow figured out how to match those but I can't
>> >> find it now.
>> >> In case you don't want to match too many people you can obviously do
>> >> that manually by just saving their WhatsApp id.
>> >> It would be great if anyone could figure out how to send things via
>> >> WhatsApp, just like replying to SMSes! Please let me know!
>> >>
>> >> On Feb 28, 12:02 pm, Amer <moamer.khad...@gmail.com> wrote:
>> >> > you can check the spesific contact by checking the notification but I
>> >> > don't
>> >> > have a clue about reading the message
>> >> >
>> >> > On Mon, Feb 27, 2012 at 4:06 PM, Ewald Kleefstra
>> >> > <ewald.kleefs...@gmail.com>wrote:
>> >> >
>> >> > > Hi everyone,
>> >> >
>> >> > > I am trying to get a context with whatsapp working. I want that my
>> >> > > profile does something when a specific contact writes something in
>> >> > > whatsapp. Is that possible?
>> >> >
>> >> > --
>> >> >
>> >> > Be first, be better, or cheat.™