Monday, January 25, 2016

Panorama-a-rama (show me the world)

Like most of us, many of my profiles only do casual things that I wish my phone did nativly.  Take viewing pictures.  Sure anyone can voice command "show me pictures of Golden Gate Bridge" but you can't say "show me panoramas of Golden Gate Bridge".

But using the Street View app, you can create a fun little trick to do just that.

Here is your end result.  You could just as easily open Street View and type in Golden Gate Bridge, but we're not in the business of that kind of effort :)



To get here you will need;
Tasker
AutoInput
AutoVoice
Street View

(The above looks better when you can tilt the phone to landscape, but that messes up the recording software)

What we're going to do, is grab the voice command "street view golden gate bridge", chop off everything after "street view" and show you pictures of it.  I don't say "show me panoramas" as a command because sometimes Google, or I suspect Moto Voice, will jump on the command and start showing panoramas in Google Search as normal before Tasker can get involved.

Fair warning, at least on my phone, this *usually* works.  I've tried launching Street View through Tasker and AutoLaunch but in both cases, Street View occasionally Force Closes on open.  I left it as just a generic "Launch App" because it's easier.

That also explains the long(!) four second wait time between the AutoVoice command and the Launch.  It makes it seem at least a little more stable.  Also, if you manually launch Street View before those total of eight seconds pass it'll still go and complete the task.

There are a couple other waits that you may or may not need.  Sometimes it just needs an extra second here or there to let things like the keyboard dropping back down before pasting to process.  Other than that, it's just some AutoInput clickity clicks to let you see all the places you wish you were right now.

The Profile;
Profile: Voice Street View (43)
State: AutoVoice Recognized [ Configuration:Event Behaviour: true
Command: "street view (regex)"
Last Cmd Id Regex: false
Last Cmd Id Invert: false
Not on Normal: false
Not on Continuous: false
Contains All: false
Use Regex Replacements: false
Do Google Now Search: false ]
Enter: Anon (49)
A1: Set Clipboard [ Text:%avcommnofilter Add:Off ] 
A2: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ] 
A3: Launch App [ App:Street View Data: Exclude From Recent Apps:Off Always Start New Copy:Off ] 
A4: Wait [ MS:0 Seconds:4 Minutes:0 Hours:0 Days:0 ] 
A5: AutoInput Action [ Configuration:Type: Id
Value: com.google.android.apps.dragonfly:id/map_action_search
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] 
A6: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] 
A7: AutoInput Global Action [ Configuration:Action: Back Package:com.joaomgcd.autoinput Name:AutoInput Global Action Timeout (Seconds):20 ] 
A8: Wait [ MS:0 Seconds:1 Minutes:0 Hours:0 Days:0 ] 
A9: AutoInput Action [ Configuration:Type: Id
Value: com.google.android.apps.dragonfly:id/search_text
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] 
A10: AutoInput Action [ Configuration:Type: Id
Value: com.google.android.apps.dragonfly:id/search_text
Action : Paste
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ] 
A11: AutoInput Action [ Configuration:Type: List
Value: 1
Action : Click
Is Tasker Action: false
Check Screen State: false Package:com.joaomgcd.autoinput Name:AutoInput Action Timeout (Seconds):20 ]

tl;dr ... download here: Panorama a ramaama
Displaying Screenshot_2016-01-24-21-48-18.png
Displaying Screenshot_2016-01-24-21-48-18.png

Thursday, January 21, 2016

Spotify Wallpaper Changer

Like I said, I'm not a programmer.  A little background on that, I had one C++ class in college and I got a C-, ironically.  Pages of code to accomplish what others could perform in less than two dozen lines.  I'm not good at it.

Still I've managed to muddle my way through Tasker to create some profiles, this one being my favorite.  Some people want to change the world, I just want to change wallpapers to look cool.

I'll post the description, and what I *think* is going on, how to configure everything that you need to get there because I believe for the rest of you who are also not programmers can learn from them to build other profiles.

This basically will change your wallpaper to the album of your currently playing track in Spotify.  First, here is the end result we're going for (do not judge my taste of music :p );



















To get here, you need these apps;
Tasker
Spotify
Media Utilities (Beta)

First Media Utilities Setup;
Add "Spotify" to the available media apps it can use.  Then go into 'Settings' and uncheck everything except the boxes for "Attempt Direct Control" and "Make Album Art Available"

You will also need an Exit Task.  This will get you back to your default wallpaper when either a track is stopped or headphones unplugged.  I suspect this will also work if you don't include the Headset Plugged profile state.  I think I left that so it didn't launch every time something else called media, like an ad.

The exit task is it's own separate task, as opposed to an anon one in the profile because I use that for other wallpaper changing profiles.  That way i only have to change it in one place if I get tired of my default wallpaper.  Everyone should always have a default wallpaper task because you'll want it sooner or later.

What this does is, look for the headset plugged in, and the media state is playing.  Once that third condition is met (New Metadata), it copies the default Media Utility album art file (mu_coverart_current.jpg) to a new file.  It then sets that copied file as the wallpaper.  This will repeat every time the track changes.  When either music is paused, stopped, or the headphones are unplugged it will revert back to your default.

Sometimes when you pause, then skip to start the next track it slips.  I get around that by not pausing then skipping to the next track.

Anyway, here is your profile;

Profile: App Spotify Wallpaper (6)
State: Media Utilities State [ Configuration:New Metadata ]
State: Media Utilities State [ Configuration:Is Playing ]
State: Headset Plugged [ Type:Any ]
Enter: Anon (42)
A1: Copy File [ From:Pictures/mu_coverart/mu_coverart_current.jpg To:Pictures/coverart Use Root:Off ]
A2: Set Wallpaper [ Image:Pictures/coverart/mu_coverart_current.jpg Scale:Off Crop:Off ]

Exit: Wallpaper Reset (45)
A1: Set Wallpaper [ Image:zedge/wallpaper/Bamboo-wallpaper-8639973.jpg Scale:Off Crop:Off ] If [ %MTRACK !Set ]

These are changes from local files because I download my playlists.  If you are playing from the server you might have to add a Wait period of a second or two before the 'Set' command so it can get the album art.

You can download this profile here: Spotify Wallpaper Change

Enjoy!

Monday, January 18, 2016

Intro (fun with Tasker)

I'm not a programmer, obviously, since I'm using Blogger.  I am, however, a Tasker enthusiast with some time on my hands.  I'm sharing a bit about the Profiles / Tasks I have created, stolen and modified to share with everyone.  Stay tuned!