• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

+1 for Tasker (reading out emails)

musicrab

Lurker
Jul 9, 2013
6
2
Sorry - bit late to the party but I've just had success with reading out texts and emails (from, subject).
I tried drivesafe.ly (free) which has a superb speech engine. It is fine for texts but unreliable for emails. (The latter is achieved by polling gmail).
So I used Tasker to handle emails, summarised as follows (I cannot post links :-(
1. use Event Notification (app = gmail) to trigger processsing
2. access the most recent entry in gmail's local dbase (use sqlite3 ensuring that the dbase diry permissions were writeable)
3. store 'from' and 'subject' in Tasker variables
4. read data out loud with TTS engine SVOX
SVOX is the next best, working TTS, I have found.
 
Hi - its probably the same code. Not sure if I've spotted it reading the last-1 email. Perhaps wait 1sec before accessing (crap) or wonder if there's a "flush updates to dbase" command you can run first?

Code is
sqlite3 db "select fromAddress from messages ORDER BY _id DESC LIMIT 1" | grep -o '"[^"]*"' | tr -d \";
sqlite3 db "select fromAddress from messages ORDER BY _id DESC LIMIT 1" | grep -o \<.*\> | tr -d '<>';
sqlite3 db "select subject from messages ORDER BY _id DESC LIMIT 1";

for (from)name, from email, subject respectively.

(Thanks to a-more-common-hades blogger and/or fubaya on google.)
 
  • Like
Reactions: KitWasHere
Upvote 0
Ahh, I read over your post too quick. I'm looking to fetch the whole email body, which I've had no luck with using sqlite. I know a "snippet" of the message is possible, but the most frustrating thing is that the info I'm looking to pull is literally like 2 words after the end of the "snippet".

Right now I'm using a python script bdanders posted on the GG, which as I said is inconsistent. As is SL4A really, I get a "Sorry, SL4A has stopped working" popup about once a week.

Thank you though, even if it was just getting my hopes up haha :p
 
Upvote 0
It's been a while since I tried to get that working, I'll have to go back and play with it.
But if I remember right "body" would never return anything, not an error or anything.
"compressed body" would return something, but it was a bunch of wingdings and I couldn't find a way to uncompress the message. Will take another look though
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones