I just finished my newest and by far most complicated script I've ever worked on.
The promise is simple - Make a photo, let Google analyze it and get their textual "best guess" back to use it in Tasker!
"Okay, so we can analyze photos, great. Now what could you do with it?" that's the question I was asking myself after getting it to work for the first time. I'm a passionate Spotify user so for the purpose of demoing it I thought it would be cool if you could use a photo to launch up albums, bands and so on in Spotify. And that's exactly what it does. It works surprisingly well and you can do some really cool stuff with it, like...
- ... snapping the cover art of one of your CD, vinyl, music poster etc. to listen to the corresponding album
- ... take a photo of an artist from a website or - even better of course - Google Image search to
- ... launching specifically named playlists - for example the playlist 'banana' - by taking a picture of a banana :)
So how does it work?
I won't go into any details right now but if there're a lot of requests I'll post a tutorial on how I did it. But as you can imagine, it's pretty complicated and I'm currently pretty busy, so don't hold your breath. However, I'll try to post a demo video probably at the end of the week (currently don't have a second cam to record my phone, lol). I'll also gladly provide all the necessary actions, profiles and scenes whenever I find the time to do that, however they will only work 'out of the box' of you meet all of the following requirements:
- a rooted Nexus 4
- Chrome and/or Chrome Beta
- The full version of Chrome UA Switcher (~$2, €1,49)
- joaomgcd' AutoShortcut (pro-version optional, I recommend it though for the sake of supporting this guy)
- GermainZ' getevent->sendevent script if you're not using a Nexus 4.
- Spotify (optional)
What are the flaws and drawbacks?
Well, it's incredibly slow. It takes 14 seconds from launching the action to get to the camera dialog. After you took your photo, it takes another crawling 21 seconds (2 Megapixel on 3G) to have Spotify open your desired song, album, band or playlist. So it's a pretty cool proof of concept, I think, but due it's long loading times it's not something you'd use on a day-to-day basis (Why would you want to do that anyway?! :). Please keep in mind that the majority of the loading time is due to all the workarounds one have to use in order to do achieve what I was looking for.
Some optimisation within the boundaries of Tasker could probably bring loading times down by 25 - 50%. A "native app" solution using similar dirty workarounds like my solution does - due to missing APIs - could cut it down to mere seconds.
Yeah, so that's it for now, have to go back to work. Hope you guys are looking forward to hear more from me. If you have any questions or some special request for the demo video, let me know.
Best,
Marc