Advertisements
07 Dec

MyFitnessPal – Record Water

I’m in the mood for something a little different. So will I’m walking here on the treadmill this afternoon I thougnt I’d share what I’ve been working on. We all know I am a huge fan of MyFitnessPall but a little disapointed there isnt a public API I can write too. So I’ve written a couple of bash scripts I now run on from my Android, these mimic key inputs. Once again, my life is automated!

The first script records water drank, simple pass it a number and it’ll record that number of glasses of water – really simple

The second one completes the days diary. Two very simple scripts, but there are catches. You must have a rooted phone, and you have to be using the Nexus 4. If your not on the Nexus 4 you can edit the first section and update all the X Y codes.

Quick simple and easy. I hope you enjoy!

Record X glasses of water

Complete the days diary

31 Aug

No Tasker Sunday

No Tasker Sunday But there is good things coming

This has been a busy week for me. At the end of last week I asked the Tasker Google+ community for some ideas of what they would like to see, and the first lesson I took away from that was – I should have asked sooner than Thursday!

The community have some fantastic ideas just waiting for Tasker, but there is no way I can do them any justice by “Tasker Sunday” so instead I offer you this post as my mitigation.

Over the next few weeks I intend to push out the first of these ideas +J Pearson gave me. Like many self employed contractors he wanted a way to get Tasker to record and track his work using voice inputs, something like:

Then at the end of the month/week be able to pull out a report of who you need to bill and for how much.

When I mentioned this idea to a few other it has definitely struck a cord so I’m going to make this my first task, although it will probably turn into a project with multiple tasks and actions.

The Futures Bright The Futures Tasker

The next thing on my ‘agenda’ is a new idea I came up with yesterday. Since Android 4.3 came out I’ve seen allot of people use the input command to mimic screen touches and swipes, this is perfect for working with applications that have no Tasker interface or public APIs you can get a hold of. The problem is any input command used is specific to the screen its been recorded on, something I do on my Nexus 4 has no hope of working on the Nexus 7 or HTC Sensation without rewriting the co-ordinates.

My idea is to create some kind of query database that will return the correct location. For example, and these are only examples off the top of my head mind you, to click the send button in the Gmail add you would ask for the location by passing “deviceid, app, button name” this would return “123,456” for the Nexus 4 and “789,012” on the Nexus 7. As this obviously a new idea there are allot of problems still to workout, like: some form of local caching, a unified naming scheme for buttons and a way for the community to input new devices and new locations. Lets just say, this will be a long process – if you have any ideas about it please drop me a line.

Before you go I wouldn’t want to leave you without

Now, seeing as I’m not posting any Tasker projects today I don’t want to leave you without. +Tasker by Ryoen has posted a fantastic and easy to follow example of using +João Dias’s AutoVoice and the new AutoApp, still in beta, to open any app just by saying its name. Hope you enjoy this

The Three Strike Rule
20 Aug

The Three Strike Rule

Three Strike Rule means if you need to talk to me, keep calling. If not text

This is just an information page. If you’ve come here from a text I sent after you tried calling me I hope this page will give you a little of the background to why, and show you how to get around it.

Some time ago I realised that simply putting my phone on silent at night was limiting and could cause more problems than it was solving if for any reason some had to get in touch with me. Being of a programming mentality and a heavy Tasker user I created a system so that while my phone is still on silent some calls can get threw.

I call it the Three Strike rule because, as the name suggests, you simple have to call me three times and on the third call the phone will ring.

The project its self has it’s own page, Inbound Call Filter, so I don’t want to go into allot more detail here. In a nut shell, if you need to talk to me keep calling and you will get threw. If you’d prefer just text.

Inbound Call Filter – Version 2.0
20 Aug

Inbound Call Filter – Version 2.0

Thanks to some feed back from +Mike Lombardi over on the Tasker Google+ page I’ve updated my project a little.

Instead of using a text file on the SD card to keep track of incoming calls I now use two arrays, one for the phone number and another to record the number of calls. I am still using the SD card to store the ‘canned’ response texts, I have thought about making this variable based as well but I’m not sure about the performance implications.

The situations when a text will be sent are very small, first it realise on someone calling while the profile is active and second they have to be calling from a recognised mobile. My understanding of Tasker would require a global variable like this it exist in memory all the time, this may not seem like allot but it doesn’t feel necessary. Plus with the current set-up to increase the calls required will only need to add a new file and update the counter in Tasker so you could make people call 10 or 12 times. Having that many responses in memory would become cumbersome.

You can get the updated details over on the project page

Inbound Call Filter
18 Aug

Inbound Call Filter

Updated 2013-08-20

Thanks to some feed back from +Mike Lombardi over on the Tasker Google+ page I’ve updated my project a little.Instead of using a text file on the SD card to keep track of incoming calls I now use two arrays, one for the phone number and another to record the number of calls. I am still using the SD card to store the ‘canned’ response texts, I have thought about making this variable based as well but I’m not sure about the performance implications.The situations when a text will be sent are very small, first it realise on someone calling while the profile is active and second they have to be calling from a recognised mobile. My understanding of Tasker would require a global variable like this it exist in memory all the time, this may not seem like allot but it doesn’t feel necessary. Plus with the current set-up to increase the calls required will only need to add a new file and update the counter in Tasker so you could make people call 10 or 12 times. Having that many responses in memory would become cumbersome.

Inbound Call Filter

This is an idea, like most, that came to me at 2am during a restless night. Like most Tasker creations it started with a simple problem. When I put my phone to sleep it goes silent till 5am, so what do you do if someone needs to reach you? What put the idea in my head was a text from my flat mate saying he’d left his keys at home and needed me to leave the door unlocked. In his case it was luck I was up late and got the text.

My first approach was a simple white list but this has limitations because in affect you are only white listing a phone number and not the person. So they could have a dead battery or taking this situation to its worst case, like most 2am thoughts tend to end up, a hospital or EMS team are now trying to phone you these are not numbers you are going to add to any white list so the first you’ll know is 5am when you check and see missed calls.

So I wanted a new solution. It struck me to use the same approach as in some firewalls and creating a kind of grey list where people can gain access to the white list by performing an action. At first I thought text but again that relies on the caller being on a mobile, so I went with calling.

My new Tasker profile will allow anyone to activate the ringer by calling me three times. On the third call the phone starts to ring, at full volume. The extension to this idea is to allow the phone to continue ringing when the same person calls again. I also wanted to let people know what’s going on by text but seeing as there’s no point in texting a land line we only text mobiles, in the UK that means any number starting 07.

This profile triggers on incoming calls and checks a folder on the SD card for a text file with the same name as the incoming number, we’ll call this the call counter. If there is no file the call is ended and a new file is created and the number 1 is written to it. We then read a text file called call.1.txt and text the caller back. If they call again we continue the process.

During the second, which we know is the second call because of the text file we created before, we again end the call and text back the contents of call.2.txt and increment the call counter file.

Now like all good processes we reach the third call. At this point the call counter file has the value 2 in it so the phone rings, at full volume. The process is the same for the 4th call and so on until you delete the file and the cycle continues. Personally I delete them every morning, but it’s a personal choice thing.

Download the project file below and import it into Tasker then just activate the the profile when you want to limit your callers. Let me know if you find any problem or can think of any improvements I can include