Android M - changes affecting light flow

I've been busy over the last couple of hours trying to get a handle on all the changes coming in the android M preview

Here's a summary of things I can see that will affect Light Flow that I'll need to work on:
  • app permissions on request - Light flow needs many permissions for everything it does and there's going to be quite a bit of work working out when those permissions are used and what to disable in the user interface when they are disabled
  • The new doze mode by default I think will totally stop any led cycling, but it looks like with some extra calls I think I can get around this
  • I don't think the "fixed volume", "relative volume" sound options will work anymore as it seems setting the stream volume isn't permitted anymore. I also need to look at the "play sound when in silent mode" as there's changes around that as there's now just a toggle mute/unmute call that can be made
  • There's a new mode of "alarms" ie so your alarm will trigger in the morning etc - like "none" but including alarms. I'll add sleep mode triggers to lightflow and a new notification type (well that's my guess)
  • There's a new Torch mode API which will be quite nice as it should allow easier control of the camera led flash for notifications than the total non-standard mess that things currently are.

There's enough there to keep me busy for a while!

It won't be possible to publish any versions of the apps with these features at the moment as google don't allow it.

Lite version status

I've had a few people asking why there's no been an update to the lite version for a long time and if it's still being developed.

The answer is yes it's still planned for updates but this last year has been very difficult as I've wanted to try and improve things for full version users.

Version 3.50 (where the interface totally changed) came out in the earlier half of last year and rolled out to paid users first. With it being such a major release there were a number of bugs that cropped up so I didn't push it out to the lite version while trying to get those fixed as quickly as possible.

The main reason for holding back is due to the huge influx in support requests once the lite version hits an update.

Just as this was starting to settle down and I was getting ready for a lite version update, along came Google IO 2014. This brought with it Android-L - the preview release to Lollipop. This caused some pretty serious issues for the app (causing the phone to get stuck in a boot-loop), so the focus was then diverted to getting that working for paid users. The boot loop was actually and Android bug, but given the number of people using it I had to find a temporary workaround.

Ok so that was the main issue with L, but there were others, the new sound modes, the changes in the way repeating alarms (not the wake you up in the morning type, but the programming ones) meant there was a lot to work through.

Focus went onto resolving those. Shortly after this Lollipop started to roll out. Quite a few things had changed from L (luckily including the boot-loop bug) but led cycling was still really inaccurate.

I've since had a couple of attempt at rewriting things to get this to run better without causing too much battery drain, but things still weren't great. So for the last couple of months the focus has been on totally rewriting this area - which has been pushed out in the 3.54 release just rolling out.

Now the focus moves onto getting the lite version up to date. It's nearly there but I'm wanting to get in-app purchasing added so people can move from the lite to the full version without needing to uninstall and download a new app - I'm in a race against time on this as we are now coming up to Google IO 2015 which I'm hoping doesn't hit quite as badly as last year!

Screen based Notification

Version 3.54.2 of Light Flow introduces a new method of getting notifications which is handy for phones that don't have a notification LED where you still want to get a visual notification of a notification.

Older version of Light Flow has a "Switch screen on" option for notifications, but it was a bit unreliable and only switched the screen on for approx 5 seconds without any control. It also caused some issues on phones where it switched the phones default screen timeout incorrectly.

This has all been replaced with a much more reliable method - now it's possible to set choose from a list of different lengths of time to switch the screen on for.

To use different switch on times first you have to grant Light Flow an administration right that allows it to instantly lock the screen. This can be access from

Light Flow->Settings->General settings and is the the option shown in the screenshot below


You will be promoted to enable the setting in android's system menus and then should have access.

Then to enable the "Switch screen on" option, go into Light Flow->Notification Settings and select a notification you want the screen to come on for.







At the bottom of the "Notification" tab you'll see 5 options which are described below:

  • Switch screen on - this switches the screen on when the notification first arrives.
  • Full Brightness - by default the screen will wake in a dim state, but you can change to full brightness. Note the brighter the screen the more battery will be used.
  • Screen on Length - allows you to select how long the screen should stay on for. Shorter times will use less battery.
  • Wake screen when in pocket - with this you can save some battery power by having the screen not switch on when it's in your pocket, in a case with the screen covered or when the phone is face down.
  • Repeating - this allows you to keep the screen flashing until the notification is cleared. As the repeating cycle of notifications is generic across all notification types the timings are set for this in another page described below.
Repeating notifications
If you select a repeating notification in notification settings you can change the settings for how often the screen switches on and for how long. This is accessed from Light Flow->Settings>Notification control style. As shown below


There are three settings for this

Cycle speed - How frequently the screen will switch on when the phone is locked to help you spot the outstanding notification. The faster this is set the more battery will be used as the screen will be on more often.

Wake screen when in pocket - if this is enabled then the screen will wake up even when in your pocket, face down or in a case with the screen covered and will therefore use more battery. 

Screen on length - the length of time the screen will stay on for. Note these timings are short to ensure not too much battery use. While testing some phones won't wake the screen on the shorted duration of 0.3 seconds and required slightly longer duration to give the phone time to switch the screen on before it's off again.



Live wallpaper
Up until now all the settings only switch the screen on. This can be handy for knowing you've a notification, but if you have the phone on a table across the room or on your desk you'll probably still have to go over to the phone to see what type of notification it is to decide if it's important enough to look at now.

We spent a while evaluating how to get a good visual notification onto the screen. We looked into lockscreen overlays but these enforce you to have an extra step before getting to your lockscreen which felt incontinent. 

After a bit of experimenting instead of showing an overlay on-top of the screen is seemed better to show something underneath the lock screen details so you can still view and unlock the phone as normal without any extra steps. A live wallpaper seemed the best approach to this.

There's a link in light flow's nav bar to access the live wallpaper or you can access control of it via the normal phone's wallpaper selection options. Once you've chosen Light Flow you can see the settings page:



The top section will show a default wallpaper but you can just select any images on your phone as an alternative picture.

Scrolling background - this should work on all devices but not all homescreens - some HTC and Samsung home screens will ignore this setting. The scrolling happens to move the wallpaper slightly as the homepage screen is scrolled fro one to the next - similar to on Nexus Devices with any wallpaper.

Lock screen notification display style
When you've got several outstanding notifications all set to repeat this option determines how to display them. You can either have one notification color show each time the screen wakes (ie cycle around each outstanding notification) or all colors show every time the screen wake.




Lock screen layout
This section determines how to display the outstanding notifications visually. 

Horizontal stripes - display a list of color bands across the screen horizontally for each outstanding notification (or just one notification if set to cycle colors)
Vertical stripes - as above but with the bands vertically
Side notifications - just show a color down the side of the screen and black for the rest of the screen

Below are a couple of examples:



Vertical stripes


Side notifications





LED behaviour differences between android 4.4 - 5.0 and 5.1

Android has always been on a rapid release cycle and still continues to be which means that across different versions the way your phone or tablet work may vary several times over a short period of time.

One area that has particularly caused issues for Light Flow users is when the LED displays.

Since the earliest versions of Android up until android 4.4 the led would be on if raised by an application as long as the screen is off. As soon as the screen is on the LED shuts off. There's no options to alter this behavior without root access on the phone and even then it's only possible if your ROM or lightflow can directly control the LED drivers bypassing Android.

Android 5.0 brought in an additional time that the led doesn't show. If the phone is in "None" or "Mute" sound mode (varies depending on the manufacturer to the name used) the LED will also not show. For a lot of people this has caused quite a bit of grief as they rely on the LED more when in silent mode to be aware of notifications.

Luckily Android 5.1 reverted this change so now the LED will show again when the phone is muted. If your phone is currently still on Android 5.0 then hopefully your manufacturer will push out an update soon to bring back the old behavior.

 
Copyright Reactle Ltd