Automatic Birthday Wish

191 views
Skip to first unread message

Sachit Naik

unread,
Aug 15, 2013, 2:05:39 AM8/15/13
to tas...@googlegroups.com
I have saved contacts in my Google account along with their birthdays. Can I detect the birthday event from “Contacts’ birthdays and events" calendar, search the calendar title in contacts and wish the respective person via SMS automatically with a pre defined message using TASKER?

SunKol

unread,
Aug 15, 2013, 2:37:38 AM8/15/13
to tas...@googlegroups.com
Tasker without root can't drill into contacts for details as you need contact's B date to compare &  send sms.

If rooted you can pull contact's B Day (Shell command) and trigger SMS using a time context. Not required to depend on calender entry then. 

However, have a look at a well tested free app http://goo.gl/oj5A1D that allows more options like Message & time variation per contact and can send sms or to facebook.


Sunil. 

Matt R

unread,
Aug 15, 2013, 3:10:59 AM8/15/13
to tas...@googlegroups.com
I think you should be able to at least detect the birthday calendar event using the State -> App -> Calendar Entry context. You should then be able to get the contact name using Misc -> Test -> Calendar Title. Getting from the contact name to their phone number I think requires either root to search the contacts database file, or SL4A.

Matt

Sachit Naik

unread,
Aug 16, 2013, 8:30:25 AM8/16/13
to tas...@googlegroups.com
I have been using Birthday Wish app and I want to try the same with Tasker. I have rooted my phone. Could you elaborate more about how to get this task done using Shell Command?

Matt R

unread,
Aug 16, 2013, 4:25:12 PM8/16/13
to tas...@googlegroups.com
Sure, it would just be taking the name you get from the calendar title and using it to run an sqlite command to search your contacts database for that person's phone number. It will be different on different devices, but here's an example that works on my phone:

Contact info (259)
A1: Run Shell [ Command:sqlite3 /data/data/com.motorola.blur.providers.contacts/databases/contacts2.db "SELECT number FROM view_v1_phones WHERE name='Bob' AND type=2 " Timeout (Seconds):0 Use Root:On Store Output In:%test Store Errors In: Store Result In: ]

Matt

Badhri Narayanan

unread,
Aug 17, 2013, 2:26:19 AM8/17/13
to tas...@googlegroups.com
I agree with Matt.. but for running the sqlite3 command, i think, you need to have the sqlite3 binary in your phone(i manually pushed it inside '/system/xbin/' folder for my Nexus 4).. Most custom roms have it, but if you are on a stock, then you might have to install it..

Useful link: https://play.google.com/store/apps/details?id=ptSoft.util.sqlite3forroot (but this did not work for me, but it might work for you)
Also for locating ur contact DB location yoy could use this: https://play.google.com/store/apps/details?id=oliver.ehrenmueller.dbadmin

For everything else, we have awesome Tasker :) 

PS: I'm not advertising for the above apps(they are not mine), I just thought it might help you to get ur Tasker creation up soon.. feel free to use any other equivalent apps as well..

SunKol

unread,
Aug 17, 2013, 2:41:28 AM8/17/13
to tas...@googlegroups.com
In my first reply itself, I have mentioned about Shell Command and SQLITE. 

However, using Tasker for such a requirement, has its own limitations. 

1. You always need to send different Bday Text to your contacts. A sms to your friend will be different from text to your boss or some relative. If you use tasker, you can still do this with IF-ENDIF, but then consider it may end up many many IF-Endif. 

2. If you want to send the text, at different time, for each contact, (A at 9 / B at 10), you need to create those many profiles.

And Most importantly, again... Why waste time to invent a wheel. ??? 

Sunil.



On Thursday, August 15, 2013 11:35:39 AM UTC+5:30, Sachit Naik wrote:
Reply all
Reply to author
Forward
0 new messages