I'm going to assume that you've read the first part of this tutorial, so let's not waste any time with formalities. Back to work.
We left off having completed a dynamic Google Search widget with a header image that changed with the time of day, a clock that tells time and stuff (go figure!), and a More button to open the app drawer. Now we're going to put Zooper aside for a little bit and start tinkering with Tasker.
As I mentioned last time, you're going to need the full version of AutoNotification in order for this to work. You'll also need Hangouts, Google+, and Gmail, although you can use different apps if you're not happy with these ones. Before we begin, be sure to allow AutoNotification Notification Access through Security in Settings.
Start by creating a new Profile and naming it New Google+. Select State, Plugin, AutoNotification Intercept. Tap the pencil to edit the configuration, and under Action Type, choose Created. Set the Notification App to Google+ and although I'm sure it's not entirely necessary, set the Package Name to com.google.android.apps.plus just to be safe. I mean, hey, you could have another app that happens to be called Google+ too, right?
Add a New Task, and for the first Action, select Variable Add. Under Name, input %GPLUSCOUNT. This will create a variable that counts up for every new notification that you receive from Google+. Next add the Zooper Widget Pro Variable Plugin Action and edit the configuration. Under ZW Variable, input GPLUSCOUNT and in the ZW Text field, put %GPLUSCOUNT. This will create the #TGPLUSCOUNT# variable that we're going to use later in Zooper. Add two more of Zooper Widget Pro Variable Plugin Actions with ZW Variable as GPLUSTITLE and ZW Text as %antitle on one, and GPLUSTEXT and %antext on the next one. This will create the Zooper variables #TGPLUSTITLE# and #TGPLUSTEXT# that will display the notifications' titles and texts through the %antitle and %antext variables that AutoNotification will automatically fill each time a new notification is created. When you're done you should have something that looks like this:
We left off having completed a dynamic Google Search widget with a header image that changed with the time of day, a clock that tells time and stuff (go figure!), and a More button to open the app drawer. Now we're going to put Zooper aside for a little bit and start tinkering with Tasker.
As I mentioned last time, you're going to need the full version of AutoNotification in order for this to work. You'll also need Hangouts, Google+, and Gmail, although you can use different apps if you're not happy with these ones. Before we begin, be sure to allow AutoNotification Notification Access through Security in Settings.
Start by creating a new Profile and naming it New Google+. Select State, Plugin, AutoNotification Intercept. Tap the pencil to edit the configuration, and under Action Type, choose Created. Set the Notification App to Google+ and although I'm sure it's not entirely necessary, set the Package Name to com.google.android.apps.plus just to be safe. I mean, hey, you could have another app that happens to be called Google+ too, right?
Add a New Task, and for the first Action, select Variable Add. Under Name, input %GPLUSCOUNT. This will create a variable that counts up for every new notification that you receive from Google+. Next add the Zooper Widget Pro Variable Plugin Action and edit the configuration. Under ZW Variable, input GPLUSCOUNT and in the ZW Text field, put %GPLUSCOUNT. This will create the #TGPLUSCOUNT# variable that we're going to use later in Zooper. Add two more of Zooper Widget Pro Variable Plugin Actions with ZW Variable as GPLUSTITLE and ZW Text as %antitle on one, and GPLUSTEXT and %antext on the next one. This will create the Zooper variables #TGPLUSTITLE# and #TGPLUSTEXT# that will display the notifications' titles and texts through the %antitle and %antext variables that AutoNotification will automatically fill each time a new notification is created. When you're done you should have something that looks like this:
Return to the Profiles Screen and Clone the New Google+ profile by long-pressing the profile name and tapping Clone. Long-press the new, cloned profile and rename it Clear Google+ by tapping the A. Change the AutoNotification Action Type type to Cancelled. Long-press on the task and choose Select Different Task. Create a new task called Clear Google+ and add Set Variable with the Name set to %GPLUSCOUNT and the To set to 0. This will reset your unread count every time the notifications in your tray are removed, either by swiping, or opening the app. Add the Zooper Widget Pro Plugin Action and set the ZW Variable to GPLUSCOUNT and ZW Text to %GPLUSCOUNT.
Now, repeat all that stuff again, but for Gmail and Hangouts. You can actually clone all the profiles and actions, just remember to change the names of the apps and package names in AutoNotification Intercept, to com.google.android.gm (for Gmail), and com.google.android.talk (for Hangouts). Replace all instances of GPLUS with GMAIL, or HNGTS (%GPLUSCOUNT becomes %GMAILCOUNT, etc). The final result should look something like this:
Oh, you noticed the three profiles at the bottom? I created those to simulate the always listening Google Now search. Quite frankly, they'll suck your battery dry sooner than you can share this blog so I wouldn't recommend using them, but for those who enjoy novelty...
Create a new Profile with the name Continuous On and choose the Screen On Event. Add a New Task and give it the same name. Add the AutoVoice Continuous Plugin Action and edit the configuration. Check off Continuous and Persistent Notification (you can always disable it from appearing through App Info in your device's Settings and it will still retain it's persistence). Repeat this with the Screen Off Event, but leave Continuous unchecked. These two tasks will turn AutoVoice Continuous on when the screen in turned on, and off when the screen is turned off, in order to conserve battery somewhat more than if you were to just leave it on all the time. Again though, I don't recommend using this unless you carry your charger with you or have an extra battery on hand.
Next comes the actual voice recognition. Add a new Profile and call it Okay Google. Choose the AutoVoice Recognized Plugin State, make sure to have Event Behaviour checked and input 'okay google' into the Command Filter. For the Task, begin with the AutoVoice Continuous Plugin and leave the Continous box unchecked, turning off voice recognition. The next action is to Launch the Voice Search app, followed by Wait. I set my wait time to 5 seconds, but you can set it to whatever you need, depending on how fast or slow you speak. Finish up by adding the AutoVoice Continuous Plugin again, but this time checking the Continuous box to turn it back on. This is necessary (for me at least) because I found that, unless AutoVoice Continuous was turned off, the Google Voice Search would NEVER stop trying to recognize what I was saying. Here's how it should look:
Keep moving, we're almost there. Now we'll get back to Zooper.
Add a new widget to your home screen and resize it to 9 x 7 (remember, we're using the Big Grid Size option through the Labs menu in Nova Launcher, set to 16 x 9). Create a Rectangle with a Width of 330, Height of 260, Corners at 2, Blur to 10, Blur Y Offset to 3, and Shadow Colour set to #40000000. Next, add Text anchored on the Top Right, with X Offset at 20, Y Offset set to 30, Text Changed to ... and size set to 20. The Font Family is Roboto-Black, Colour is #ffaaaaaa and Rotate is set to 90. If you can find a Module OnTap Action that could fit with this, let me know. The Expand Notifications Nova Shortcut doesn't work for me. Expanded Desktop's fault maybe? Who knows? Whatever.
Now come the three Rich Texts. The Screen Anchor (for all three) will be Top Left and the X Offset (also for all three will be 25). The Hangouts Y Offset is 30, Gmail is 110, and Google+ is 190. I've set the Module OnTap Action to launch their respective apps, Font Size is 20, and Colour is set to #ffaaaaaa. I set the Font Family to Roboto-Regular, but I have a sneaking suspicion that that's the system default on my phone...
Edit Text Manually and input one string for each of the three different Modules:
Hangouts (#THNGTSCOUNT# New)
[tr=35][s=15]$#THNGTSCOUNT#=0?Tap here to send a message:#THNGTSTITLE#: #THNGTSTEXT#$[/s][/tr]
Gmail (#TGMAILCOUNT# New)
[tr=35][s=15]$#TGMAILCOUNT#=0?Tap here to send an email:#TGMAILTITLE#: #TGMAILTEXT#$[/s][/tr]
Google+ (#GPLUSCOUNT# New)
[tr=35][s=15]$#GPLUSCOUNT#=0?Tap here to open Google+:#TGPLUSTITLE#: #TGPLUSTEXT#$[/s][/tr]
Finish off by disabling the Widget OnTap Action and return to your home screen to be greeted by something that should look like this (your popularity and battery life may vary):
Congratulations, you made it. Hell, I'm surprised I did. Next time I may just do something like, say, post a link to a list of downloads so you can just apply it to your device without having to read my drawn out explanations...but for now I'll just send you a virtual high five for doing it all by yourself.
Feel free to +1, share, comment, complain, suggest, digress or obsess.
See you next time, and thanks for reading!
No comments:
Post a Comment