Saturday, 16 July 2011

Android Intents (aka Widget Locker support)

Llama now supports sending Intents to any other application. This allows Llama to make Widget Locker (a popular lock-screen replacement) lock and unlock on Llama's command.

Intents can be pretty complicated, but I'll try and explain the basic idea. An Intent can have a target; that target can either be a particular piece of functionality in an application, or a more generic description of a piece of functionality. As well as the target, intents also have a random blob of data that the target should be able to understand.

Android's shortcuts (which Llama already supports) are powered by intents, with the major difference being that an Android shortcut forces an app to provide a nice UI to create the shortcut's intent. You'll need the third party app's documentation to be able to craft an Android Intent action. Fortunately, Llama comes with Widget Locker's supported intents built in. You can use these in conjunction with Llama's screen lock action to ensure that widget locker is suspended when the screen lock is disabled, and that widget locker re-locks the screen when Llama reenables the screen lock.

Widget Locker is pretty good, and you can place Llama shortcuts on Widget Locker's sliders. For example, I now have sliders to turn on Bluetooth and to set my phone to silent for an hour. I can quickly use these if I'm popping out at a random time and want to listen to music, or if a meeting has come up. Ultimate laziness! Of course, Widget Locker isn't free, so if you're buying Widget Locker, you should donate too :)

Also in this version is a small warning about the Alarm volume. It seems that Samsung's quest for usability conflicts with Androids/Llama's alarm volume. Samsung allow you to set the Alarm volume for each alarm that you set. Each time the Samsung alarm app fires an alarm, it overrides the current Android alarm volume with the volume for that alarm. This means that if you set Llama to silence the alarm volume, Samsung would just reenable the alarm volume when the alarm goes off. To workaround this, you need to use an alarm clock app that doesn't think it's in charge of the Alarm volume setting.

And finally, here's a download link. It'll probably be on the market some time this week. As usual export your data before installing test versions.

http://www.mediafire.com/?ctwunw4o183skcs

Saturday, 9 July 2011

Le Llama and a mini-update

Llama has now been translated into French. May thanks for nico@nc for that! There's also some smaller things:

  • I've allowed profile change actions to activate the profile lock
  • There's now a screen rotation action; it's a bit weak at the moment, but I'm waiting for an interesting Cyanogenmod commit to be put into a final build before extending it
  • There's a Car Mode action so you can turn car mode on and off
  • The screen lock action now has a heftier warning if you try and use it. £5 says people still email me about the side-effects it causes

Assuming I haven't broken anything, I'll put this on the market tomorrow.

Download

Saturday, 2 July 2011

Ah, the inevitable post-release force close

It's always nice to see the number of 5 stars creep up shortly after a new release. It's less nice to see the number of error reports in the market dashboard also increase by 1. It turns out that not all calendars will have an account name attached to them. So I've quickly patched that and released a fix. You may not know but Android lets you attach multiple accounts to your phone. I have my kebabapps account and real-life account on my phone. The calendar condition shows which account each of the calendars belongs to.

Also in the fix is a shiny new phone reboot condition that lets you run actions before your phone shuts down or after it turns back on.

One day, when I'm surrounded by every different type of Android phone running each different version of Android these bugs won't happen anymore :D ... donations welcome, lol. Hopefully there aren't any more problems as I'm off to bed soon... I'll fix anything else in the morning. G'night.

July's Market Version

I've just rolled out the next update for Llama that contains all of the changes from the last few betas. Some of the highlights of this version are Noisy Contacts and an improved calendar condition.

Noisy Contacts could be an app on its own, but it's bundled into Llama's profiles. Noisy Contacts lets you choose the people that your phone should ring for even if its volume is set to silent. The way this works is each profile is assigned any number of contacts, and you also provide the volume that you want to override the profile's usual ringing volume. You can also use this feature in reverse. If you want to stop your boss calling you during your time off, you can create a profile that has your boss as a noisy contact, with the volume set to silent. That way your phone will ring for everyone except for him! Perfect for weekends :)

The calendar condition was fairly rubbish when it was first released. Many of you wanted to be able to respond to any calendar event, or a number of differently named calendar events. Llama now lets you enter zero or more words that should match a calendar event. Llama also lets you pick which calenders those events should be in.

Another experimental feature has also crept it. As I discussed in another blog post, you can get Llama to respond to notifications from other apps. The UI for this is not completed yet. Geeks only :) Finally, there's a debug setting to disable writing the Recent cells list to disk, simply because someone asked for it and I'm nice.

There's also a handful of other actions and conditions, and the odd UI tweak. See below:

Version 1.2011.07.02.1835:
  • Noisy Contacts - set some contacts to ring even when silent!
  • Ignore cells
  • Profiles UI improvement
  • Fix for setting volume on newer HTCs
  • Minimalistic Text Widget support
  • Conditions:
    • Calendar allows any/multiple names, allows you to choose calendar
    • Airplane mode
    • Connect/disconnect ANY WiFi
    • Monitor other app notifications
  • Actions:
    • Run shortcuts, more apps eg Google Maps Nav
    • 4G
    • Wifi sleep policy
    • Haptic feedback
    • Kill with root
    • Wallpaper
    • Reminders improved

So what's the next big change I hear you ask? After adding the Wifi connected/disconnected condition I noticed a lot more Llama freezes :( This is because the API call that Llama needs to monitor Wifi connections has a tendency to just freeze for about 10 seconds sometimes... randomly... long enough to a) annoy you b) annoy me and c) make Android show the 'Application not responding' window. When Llama was first written, it only had 13 actions and conditions, now it has 50! Llama needs to evolve from a silly single-threaded app into a proper multi-threaded application. There'll be the usual handful of smaller actions/conditions too. Cheers all.

Wednesday, 22 June 2011

Another week, some more features

I've been a bit busy with Llama, so there's a few more new features:

Version 1.2011.06.22.2120
  • Change wallpaper action (it's functional, but a bit rubbish at the moment)
  • Reminders suck less, you can actually clear them now
  • You can create events based of other apps' notification icons. e.g. Gmail, new sms, Google Talk (you'll have to enable Llama as an accessibility service
  • Kill with root action
  • Ability to ignore cells
I've also looked into some battery issues with the experimental cell polling. After upgrading to CM7, the Android System process occasionally "forgot" to let go of it's network-location wakelock, even though Llama told the system it was no longer interested in location updates. Let me know if you notice any improvements.

One massive oversight with my HTC Desire Z is the lack of LED control. I've previously owned a Motorola Milestone, which had a tri-colour LED. It was cool having different LED colours for Gmail or new SMSes. My Desire Z has no such LED. It has a green and amber LED, but these are mainly used for charging status. When my phone has an unread notification, it's green. However, if my phone is charging and is fully charged, it is also green, which means i have no idea whether I have a notification, or if my phone has finished charging. One saving-grace is that the Desire Z has a flashing trackpad LED. Unfortunately, this blinks very slowly when there's a notification, so slowly you'd hardly notice it. The trackpad can also blink rapidly if there's an incoming call. HTC need to start including tri-colour LEDs again.

So anyway, back to Llama.... Llama now lets you watch notifications and run actions. By using a GScript shortcut, you can run a script that starts the trackpad LED flashing as if the phone was ringing. I can now see when I have notifications a bit more reliably :) The GScript scripts look like:

Start flashing trackpad:
echo 3 > /sys/devices/platform/leds-microp/leds/jogball-backlight/brightness

Stop flashing trackpad:
echo 0 > /sys/devices/platform/leds-microp/leds/jogball-backlight/brightness

The events look like:
App Notification com.jb.gosms, Screen off -> Run a Gscript shortcut (trackpad blink)
App Notification com.google.android.gm, Screen off -> Run a Gscript shortcut (trackpad blink)

You can then use an event to turn them off:
Screen Off -> Run a Gscript shortcut (stop trackpad blink)

This basically replicates the functionality of LED me know and LightFlow using Llama events. I couldn't get either of those to work satisfactorily in CyanogenMod 7. Eventually, Llama may have a proper LED control action. It's still early stages and needs a lot of improvement (i.e not using GScript scripts, because GScript shows a console when it runs the script)

Finally, here's the link:

http://www.mediafire.com/?mj40jwl5f089t60 Remember to export your data before you install it, just in case you have to roll back!

Monday, 13 June 2011

A thousand 5 stars and another test version

Llama received it's 1000th 5 star rating today, which is pretty cool. There's a new freshly compiled test version located here:
http://www.mediafire.com/?zd76xtey1xwbvbb

As usual, export your current settings before installing this version just in case you have to roll-back to an older version.

As well as some new conditions and actions, Llama now has a lock button on each profile's row in the list. This lets you quickly tap silent without having to do that infuriating long-press. I've actually had a few meetings in real-life work and it's been annoying me so I'm sure it's been annoying you! :)

Another notable change is that you can now run shortcuts. This may not seem that exciting right now, but you can now nag other app developers to support Llama (and the rest of Android) by using standard Android shortcuts. Creating shortcuts for Android is easy (for developers), and there's plenty of good examples of how to do it kicking about on the internet. It also means I don't have to write any boring documentation.
Some apps that immediately come to mind are:

  • Advanced Task Manager - lets you create a shortcut for it's kill applications action.
  • Gscript Lite - lets you create shortcuts to the geeky scripts you've written.
  • DropSpace - lets you start a sync to your Dropbox account
  • Browser - lets you open the browser at a web pages.
  • Music - lets you create a shortcut to a playlist, which starts playing immediately.
  • Llama - lets you define a number of actions that can be run, such as a shortcut to Llama that lets you define a number of actions that can be run, such as a shortcut to Llama that lets you define a number of actions that can be run, such as a shortcut to Llama that..... BOOM. (I've not tried this, nor would I recommend trying it :P)


Changes in version 1.2011.06.13.2240

  • Run application shortcuts
  • Run all applications, even those with two entry points like Maps and Navigation
  • Change WiFi sleep policy
  • Change haptic feedback
  • Create events based on enabling/disabling Airplane mode
  • Activate and lock profile button in the profiles list

Saturday, 4 June 2011

Noisy Contacts, sneaky Facebook

One of the most requested features for Llama was to be able to pick some Contacts that should be able to ring even when the phone is silent. The new version which does this is ready for testing :) Make sure you backup your current data, as this version adds some more stuff to saved profiles. If you have to downgrade back to the market version, the old version may crash because it's not expecting the noisy contact settings to be there.

http://www.mediafire.com/?grkredpv759z3q2
Version 1.2011.06.04.1215

You can now specify a list of contacts for each of your profiles. You can also set a volume level that these contacts should ring at. When you receive a call from one of the contacts that you've picked, your phone will ring at the volume level that you've set.

This means you can potentially have two Silent profiles: one for work and one for home. You may want your Silent - Work profile to be active at work. This profile would have all of your work contacts, so that your boss can always get hold of you during working hours, however everyone else wouldn't ring and disturb your  meetings. Your Silent - Home profile would then be active at night. This profile would only have your wife and kids, so they can contact you in an emergency, while your boss's calls will be silent so he doesn't disturb you whilst you aren't getting paid.

Of course, there's nothing limiting it to silent profiles. You can use Noisy Contacts on a quiet profile, so that your phone still rings quietly for everyone else, but loudly for your family. You can also make it work the other way around. You can set up a profile that normally has the ringer on, and then set the Noisy Contact Volume to zero, so that the ringer is always silent for whoever you select.

You'll currently have to add people manually for each profile. I plan on improving the people picker by adding searching and Google contact group selection (the documentation on contact groups is fairly poor). Also, Facebook seem to deliberately block any app aside from the official contacts app from reading Facebook contacts stored on the phone. The HTC Sense Facebook app apparently works as expected though, but I no longer have Sense on my phone. If you want to add a Facebook contact as a noisy contact, you'll have to create a Google/Phone-only contact for them (and then merge it with the Facebook one to keep your contact list tidy).

Here's some info about Facebook being mean:
http://www.engadget.com/2011/02/22/google-disables-contact-sync-in-facebook-for-android-only-nexus/
http://stackoverflow.com/questions/4506571/how-to-get-a-contacts-facebook-id-or-url-from-native-contacts-content-resolver

One day I'll put a page on this blog listing all of the limitations of Android and other apps (mainly looking at at you, Facebook) so you can prod their devs to fix any shortcomings and get Llama (and other Android apps) working better.

Llama doesn't do any special handling of the ringtone; it will just use whatever one is associated with that contact or the default ringtone. Make sure your silent profile doesn't switch to the 'Silent' ringtone from the ringtone picker. Instead, make sure your Silent profile is defined by setting the ring/vibrate/silent mode to Silent.

Also in this version:

  • 4G on/off switch. If someone could test that and let me know if it works I'd be grateful. I don't own a 4G phone :( If you want to send me a 4G phone for free, then get in touch :D
  • Some of you reported that the Ignore invalid cell/no signal stopped working, so this has a possible fix
  • Minimalistic widget stuff is back
  • Weird BROADCAST_STICKY force closes on MIUI should hopefully be fixed.
Please email me any bugs. Use the Llama-help button in the app or the contact developer button in the market. Cheers.

EDIT: This version will be on the market in a couple of weeks if no one finds any bugs.