android

[TASKER] Enhanced car mode with NFC toggle


Sony Xperia ZIt's been a while since I posted anything so it's fitting this'll be a long one! I recently got a Sony Xperia Z to replace my old LG Optimus 2X. Along with it's great screen, waterproofing and vast speed, it has NFC. With work I am driving to various client sites and it's an increasingly common occurrence to receive phone calls while driving. As I have no hands free kit I always used to take these calls using the speakerphone, requiring a swipe and then poke to answer the call.

Having been inspired by a work colleague using NFC to enable work mode on her phone, I thought I should use this to have a more robust car mode. Many of the newer Android phones already have a car mode which removes the need to swipe to answer and defaults to answering on the speakerphone. This can be turned on via tasker. However it would be just as simple to press the home screen icon if this was all that I wanted.

I bought some clear RapidNFC tags from Amazon, delivery was fast and well packaged.

It's worth noting that on my phone sometimes the task and profile names will differ slightly from those stated here, so if your screen doesn't look exactly the same as the screenshots don't panic!

Additional features

From previous posts, I've included auto responses from SMS and an automated work mode (based on time). I wanted to have the SMS functionality within car mode but not disrupt work mode when out of the car. The profiles have been tweaked to work with the new phone and some redundancy has been added to cope with car mode (ie speakerphone off).

Quick reminder for work time:

Profile Name Work Mode Normal Mode
Profile Active? Active Inactive
Context: Mon,Tue,Wed,Thu,Fri
8:25 till 18:00
Sat,Sun
Task

Task Name: Work Time

  1. Alarm Volume [ Level:2 Display:Off Sound:Off ]
  2. Media Volume [ Level:0 Display:Off Sound:Off ]
  3. Ringer Volume [ Level:0 Display:Off Sound:Off ]
  4. Default Ringtone [ Type:Notification Sound:Silent ]
  5. Default Ringtone [ Type:Ringer Sound:Cassiopeia ]
  6. Vibrate On Ringer [ Set:On ]
  7. Speakerphone [ Set:Off ]

Task Name: Normal Time

  1. Alarm Volume [ Level:2 Display:Off Sound:Off ]
  2. Media Volume [ Level:5 Display:Off Sound:Off ]
  3. Ringer Volume [ Level:4 Display:Off Sound:Off ]
  4. Default Ringtone [ Type:Notification Sound:Pop ]
  5. Default Ringtone [ Type:Ringer Sound:Warriors Of Time ]
  6. Vibrate On Ringer [ Set:On ]
  7. Speakerphone [ Set:Off ]
Closing Task
  1. Perform Task [ Name:Normal Time Stop:Off ]
  1.  None

Work time integration

I set up an additional profile which matches the contexts for Work Time but the opening task is simply:

Variable Set [ Name:%WORKTIME To:1 Do Maths:Off Append:Off]

and the closing task:

Variable Clear [ Name:%WORKTIME Pattern Matching:Off ]

These set the %WORKTIME variable (which has to be all capitals) to 1 whenever it is work time and clears the variable when it's not. This will allow the car mode to reset back into the appropriate setup when it's exited.

Auto response integration

The context of the profile has been simplified to be Event: Received SMS. There is no longer a requirement for Copilot detection or power source detection as this profile will be normally be inactive until activated as part of car mode. This profile is now called SMS Car Mode.

Car mode notifications

CALLS car mode setup

 The context for car mode is Variable Value %CARMODE matches 1. Once the switch has been set up this allows the car mode to be permanently active. This profile is called CALLS Car Mode.

  1. Notify [ Title:JB's magical Car Mode Text:Enabled Number:1 Permanent:On Priority:3
  2. Profile Status [ Name:Work Mode Set:Off
  3. Car Mode [ Set:On Go Home:Off
  4. Speakerphone [ Set:On
  5. Wait [ MS:0 Seconds:10 Minutes:0 Hours:0 Days:0
  6. In-Call Volume [ Level:5 Display:Off Sound:Off
  7. Ringer Volume [ Level:5 Display:On Sound:Off
  8. Media Volume [ Level:12 Display:Off Sound:Off ]


 The notification reminds me that car mode is active. Work mode is disabled so that,  for example, at 18:00 if I'm driving my phone doesn't switch into 'normal' mode. The phone's built in car mode enables simple one poke answering with speakerphone enabled (the speakerphone on is incase the built in car mode got disabled accidently*).

My current phone holder often presses the volume down button as it's gripping the phone so the 10 second delay allows me chance to secure the phone in the holder and stop pressing the volume button. The volumes are then reset to hear incoming calls (ringer), sat nav (media) and speakerphone (in-call). Due to the fact that the volume often gets lowered when attaching to the screen, I felt it was reassuring if one of the volume changes is displayed onscreen so that you can see that the volumes have increased to what they should be.

*I suspect the chances of accidentally exiting car mode when driving is extremely low but during testing, in my flat, I was jumping in and out of tasker/settings windows and sometimes it would close unexpectedly.

Car Mode exit taskCar mode exit task

  1. Notify Cancel [ Title:JB's magical Car Mode Warn Not Exist:Off ] 
  2. Car Mode [ Set:Off Go Home:Off
  3. If [ %WORKMODE ~ 1 ]
  4. Perform Task [ Name:Work Time Stop:Off Priority:5 ] 
  5. Else 
  6. Perform Task [ Name:Normal Time Stop:Off Priority:5 ] 
  7. End If 
  8. Profile Status [ Name:Work Mode Set:On ]

This is where the work mode intregration comes in... on exiting car mode it runs the correct task depending on whether it should be work time or normal time. This is possibly acting as redundancy as reactivating the profile should set these again but due to the critical importance of work mode being set, I deemed it worthwhile.

NFC toggling

To enable toggling, set up a named task with the following:

  1. Profile Status [ Name:CALLS Car Mode Set:Toggle ]
  2. Profile Status [ Name:SMS Car Mode Set:Toggle ]
  3. Variable Set [ Name:%CARMODE To:1 Do Maths:Off Append:Off]


NFC Tag size comparisonWhen this task is called it toggles the SMS and CALLS car modes to on and sets the %CARMODE variable to 1. The variable doesn't do anything else and never changes, as mentioned above it allows the CALLS Car Mode profile to be permanently active. The only thing left to do is set up the trigger for this task.

Using NFC ReTAG FREE you can associate NFC tags with various activities (including launching Android's standard car mode directly if you want a basic car mode). Once you've scanned your tag you need to assign your activity. The feature you need is within Labs > Tasker Task (advanced) which allows you to call the named task you just set up. If done correctly, scanning your NFC tag will now result in toggling your CALLS and SMS Car Mode profiles.

Remind me why I bothered if I can enable car mode directly from NFC ReTAG?

Method Doing nothing Standard car mode Enhanced car mode
Answering Swipe Single poke Single poke
Speakerphone Single poke Automatic Automatic
Display sleep Depends on your setup Phone will not sleep in car mode (unless you manually turn off screen) Phone will not sleep in car mode (unless you manually turn off screen)
Ringer volume As set As set Specific car options
Sat-nav (media) volume

As set

As set Specific car options
Speakerphone (in-call) volume As set As set Specific car options
Auto respond SMS No No   Yes
SMS over speakerphone No No   Yes
Seamless switch back to normal/work volume profiles No No  Yes

To find the apps needed use the links below:

Tasker

NFC ReTAG FREE

Windows 8, CyanogenMOD 9 and a Google Adsense payout!

It's been an interesting month! I have finally received a payment from Google's Adsense! It has been set up for about 3 years and last week I finally reached the minimum requirement for payment. I'd almost forgotten that the account even existed. If only Quidco woke up and worked for me now!

CyanogenMOD9

CM9 for the LG Optimus 2X has also been released in a 'very beta' form thanks to Arcee. You can download it from rootzwiki and get Google apps from goo-inside. (Using the SK3 build) It seems pretty good at this stage, I found the menus very fast and smooth. There are several known problems particularly with the video camera, I couldn't personally get mobile data to work consistently but others have had it going after flashing the 20L baseband (coming from 20A) my data problem was fixed. The menus remained stutter fee even after installing all my apps! One annoyance is the lack of USB mass storage, I can only choose to connect as a camera or a media thingy, neither of which work as quickly or have the controls (from windows end) of regular mass storage. I have since gone back to CM7 because I can rely on it for work etc but I am very excited for future developments.

 

Windows 8

I spent several hours messing about on Thursday night /Friday morning trying to get Windows 8 installed, I was going to try to 'upgrade' from 7 but that failed twice, eventually on Friday morning I dug out an old HD, plugged it in and installed a fresh copy on there! Anyway, when I got home from work and finally had a play with it... well... I had no idea how to do anything! I felt I was missing buttons for back, menu, home and search! It was as if someone had hooked up a smartphone to my computer monitor and forgotten to give me the phone to control it with.

Typical website in the IE Tile

I'll talk you through a few initial thoughts and problems I had...

I clicked my first tile, the app store, it opened and I had a MASSIVE white screen with some pictures in the middle. It felt similar to other market apps on my phone. My initial impression was that the app wasn't really making use of my large screen. I normally have many windows open at once, none of which maximised allowing me to rapidly switch between tasks and have multiple windows side by side. It looked clean though, my first problem as such was that I had no idea how to leave this program! There was no cross, no back button, the edges didn't seem to do anything! I was stuck in a crazy sized app store! Turns out when I eventually put my mouse in the few pixels at the extreme bottom left of my screen a little box popped up that resembled the start screen, finally a way out! 

The feeling of wasted space wasn't just with the app store, with a full-screen toolbar-less browser ie the default Internet Explorer tile, many websites are 50% background with a relatively narrow page in a column down the centre of the screen.

After a bit more fiddling I found that many of the menus are activated by first moving your mouse to the very corners of the screen or right clicking within the screen. This allowed access to additional options and features.

Some time later...

The new copy window

I have now had much more time using the new OS. I feel I am now starting to understand how the guys at Microsoft wanted me to use the tiles. I think the benefit (run with me) will be seen when many more apps utilise this new metro interface and when they integrate more strongly. I clicked on someone's address within the People app and it opened Bing maps in the IE tile, that's fine but wouldn't it have been better to open in the maps tile? Subtle but that is the difference that will make it feel as integrated as an iOS or Android operating system.

As an added extra, I installed the latest NVIDIA drivers and copied Skyrim over from my regular HD and it worked perfectly set at ultra (so at least as well as Windows 7). I don't think anyone doubted Windows 8's performance but figured I'd test it for good measure!

To summarise the metro experience, it is like the world's most powerful phone ever with a 24" non-touch screen and no working app store... yet. Lots of potential. I'm going to continue using Windows 8 on and off and will probably update again at some point in the future.

[TASKER] Automatic work-phone profile

First (and long overdue post) of 2012! Started a new job so I've been pretty busy. With the new job theme I have created a new task in Tasker to make my phone more work friendly. I know there are a load of similar automatic phone profile scripts. Most make your phone go to silent but I need my phone to be more businessy! With my job I am often at clients offices and as a result my mobile will be a key form of communication for my office to get hold of me. 

I want to have a boring businessy ringtone in case it is overheard at client offices, I also want my SMS and email alerts to be silent and not have the distraction of vibration. I do however need vibration for calls otherwise I probably wouldn't even notice them!

Set normal profile

Context

  1. Day: Sat and Sun

(this isn't really important but worth NOT overlapping with work times in case you enable this profile)

Tasks

  1. Default Ringtone [ Type:Ringer Sound:03onceinawhileRingtone ] 
  2. Alarm Volume [ Level:4 Display:Off Sound:Off ] 
  3. Notification Volume [ Level:5 Display:Off Sound:Off ] 
  4. Ringer Volume [ Level:6 Display:Off Sound:Off ] 
  5. Media Volume [ Level:2 Display:Off Sound:Off ] 
  6. Vibrate On Notify [ Set:On ] 
  7. Vibrate On Ringer [ Set:On ] 
This script will normally be disabled but by going into tasks and hitting the test button (looks like a play button) it will reset your settings in case something goes wrong or you are testing other settings.

Set work profile

Continue reading

[TASKER] Automatic response to SMS while driving

Inspired by Lifehacker's App Of The Day suggestion for Auto SMS, I decided once again that instead of having another app installed I would change my Tasker profile.

In Some Tasker Profiles I detail how to set up a profile to read out a SMS while driving. As I need the same contexts I will simply add a task to the profile.

A quick reminder of original profile

Context

  1. Event: Received Text
  2. State: Power [ Source:Any ]
  3. Application: CoPilot Live EU Major

Tasks

  1. Wait [ Seconds:4 ]
  2. Say [ Text:%SMSRN sent the following SMS: %SMSRB ]

If I'm driving for a long time, I'd always have the phone plugged into a charger and on copilot. The reasoning behind the order of the contexts is predominantly for the sake of battery life (minimising the context checks). The delay in saying the SMS is to allow the notification tone to finish.

The extra task you need for auto response

Send SMS [ Number:%SMSRF Message:[Auto Response] I am currently driving and will get back to you soon. James Store In Messaging App:On]

I have formatted the above to make it more clear. Whether or not you 'store in messaging app' makes no difference to sending the message, I simply wanted a record of what has been sent back and forth.

You can download the full profile Read SMS While Navigating 2, don't forget to change the name if you're not called James!

On Android Market:

Tasker

Auto SMS