1. Are you ready for the Galaxy S20? Here is everything we know so far!

+1 for Tasker (reading out emails)

Discussion in 'Android Apps & Games' started by musicrab, Jul 9, 2013.

  1. musicrab

    musicrab Lurker
    Thread Starter

    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.
     


  2. KitWasHere

    KitWasHere Well-Known Member

    Has this been reliable/consistent for you? Could you post the sqlite script? I found one on the Google groups but it will sometimes pull the second to last received email.
     
  3. musicrab

    musicrab Lurker
    Thread Starter

    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.)
     
    KitWasHere likes this.
  4. KitWasHere

    KitWasHere Well-Known Member

    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
     
  5. musicrab

    musicrab Lurker
    Thread Starter

    I'll have a look (but you'll know this already) column 14 is "body". Have you looked at that?
     
  6. KitWasHere

    KitWasHere Well-Known Member

    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
     
  7. musicrab

    musicrab Lurker
    Thread Starter

    Hmm body appears does appear to be doing strange things...
     

Tasker

Tasker Forum

net.dinglisch.android.taskerm

⚙No repetitive tasks for you, let your Android device handle it!⚙
Total Automation, From Settings to SMS. Here are only some
of the things you could do with Tasker. Its real power is the flexibility to combine contexts and tasks however you wish: https://tasker.joaoapps.com/exampleuses.htmlAutomations
Make your phone a true smart
phone! Why remember to change the volume every day when you leave home when your phone can do it for you? Automate stuff based on the app you're in
, the time of day
, your location
, your Wi-Fi network
, Received SMS or Calls
, the currently playing song
and many other (130+) states and events! Check out how easy it is to create an automation: https://www.youtube.com/watch?v=s6EAbLW5WSkActions
350+ actions allow you to truly customize your phone like never before! Send SMS, create notifications, change almost any system setting like Wifi Tether, Dark Mode, Always On Display, change any volume, control Do Not Disturb, open apps, file manipulation, control music playback, get your location... you get the idea. If you can think of it, Tasker can probably do it for you! Note: root is NOT (I repeat NOT) required for majority of the functions.
However, a few of the actions (like the Airplane Mode action and the Mobile Data action on some devices) require root. Regarding those few actions that do require root, this is because of Android security policies that developers cannot work around. ☑ Other Triggers
Manually trigger your actions via launcher shortcuts, quick setting tiles, widgets, long-pressing volume buttons, media buttons (like the ones on your BT headsets or headphones), Bixby button, Navigation Bar, Notificaitons and more! ☑ Join - Remote Tasker
Adding Join (https://play.google.com/store/apps/details?id=com.joaomgcd.join) to the mix will even allow you to trigger tasks from another Android device or PC! ☑ Scenes
Design your own UI and use it to display any info you want or trigger any task! ☑ App Creation
Create your own standalone apps to share or sell with the Tasker App Factory (https://play.google.com/store/apps/details?id=net.dinglisch.android.appfactory)! ☑ Developer Friendly
A lot of 3rd party developers already allow you to perform actions in their apps and listen to their events/states through Tasker! Check out a list of plugins https://tasker.joaoapps.com/pluginlist.html. You can also call most of the Web APIs from Tasker with the powerful HTTP Auth and HTTP Request actions! Check out an example https://youtu.be/yAt2D1XmgUI. ☑ 7 day trial - one time payment to unlock
Get it here: https://tasker.joaoapps.com/download.htmlUseful Links
Starter Guides: https://tasker.joaoapps.com/guides.html Pre-made projects: https://forum.joaoapps.com/index.php?resources/ Official Support Forumhttps://groups.google.com/forum/#!forum/tasker Community full of people willing to help: https://www.reddit.com/r/tasker/ It's not possible to fix problems reported via Play Store Comments so please use the "Report Issue To Developer" option in the app > Menu to do so. Note
: Tasker uses the BIND_DEVICE_ADMIN permission in order to provide the System Lock functionality

READ MORE
February 15, 2020
Last Updated
4.4
Rating
1M+
Installs
Loading...

Share This Page

Loading...