mat

mat

Nexus Revamped Live Wallpaper: Update 1.98.01 (Multi-touch and more!) #android

To celebrate getting over 1/4 million downloads of my live wallpaper I decided to put extra effort into fixing problems some of my users were having. A common gripe with live wallpapers is the amount of battery they use and the associated performance hit when navigating on the home screen. I used to use java drawables to create and manipulate all of the particles on the screen, but I have successfully moved over to OpenGL-ES. This has an impressive benefit in performance (back of the envelope calculation shows >13x performance increase) and also improves the overall sexyness as OpenGL handles the blending nicely.

Anyway enough of the boring stuff, let’s see what’s new. Something I’m REALLY excited about (hence the caps) is multi-touch! It is so much fun just playing with a blank home screen creating particles! Unfortunatly this isn’t something which translates well into a screenshot, so you’ll just have to try it out for yourself.

Nexus Revamped 1.98.01 screenshot

Nexus Revamped 1.98.01 screenshot

New Particle Appearance Screen

New Particle Appearance Screen

I’d like to thank all of my beta testers for the very helpful feedback I have got over the past couple of weeks. There is much more to mention but I am now absolutely knackered. I’m sure I’ll follow this post up soon with some more interesting things. Enjoy!

Changelog

1.98.01

  • Improved: Now using OpenGL to draw the live wallpaper, which should give approximately a 16x performance increase (awesome eh?)
  • Added: MULTI-TOUCH!!! :O
  • Improved: Lowered file size from over 1Mb to less than 300Kb
  • Added: Option to not spawn particles when dragging / swiping across screens etc, set by default
  • Added: Anayltics see which areas need improving
  • Added: Sexy Particle appearance dialog to set saturation and tail length
  • Removed: Tail length and particle saturation (see above)
  • Added: Custom colors for battery level colored particles
  • Added: Speed now allows you to set the minimum and maximum speed
  • Removed: Removed speed deviation (see above)
  • Improved: Scaling can go negative now (i.e. shrinking)
  • Improved: Lots of default values changed to make prettier on first run
  • Improved: Speed and Spawning decoupled from FPS settings, should be uniform now
  • Improved: Max FPS setting now 80 (25 is recommended still)
  • Improved: Max speed increased
  • Improved: Max tail size increased
  • Improved: Max particle number increased
  • Improved: Added some nice icons in the about menu
  • Bug Fix: Particle alignment works more consistently on different screen sizes and scales

Android Market Links
Either click the following android market links (in android phone) or search the market for nexus revamped.
Pro Version
Nexus Revamped Pro Live Wallpaper (com.stealthcopter.nexusrevampedpro)

qr

Free Version

The free version is the same as the pro version but with some of the fancier features are missing, and some non-intrusive adverts. Both versions are fully supported.

Nexus Revamped Live Wallpaper (com.stealthcopter.nexusrevamped)

Download link

qr

Read More

HTC Desire HD stand and battery charger

Just a quick post to mention how much I am enjoying using a dock for my phone. It only cost ~$19 avaliable on dealextreme, it comes with a EU plug (US version avaliable too) but I’m just using it via usb.

HTC Desire HD stand and battery charger

HTC Desire HD stand and battery charger

What’s that awesome live wallpaper? It’s the latest beta of nexus revamped! This dock has been really useful for development of this livewallpaper, so handy/convenient.

Read More

Looking for beta testers for nexus revamped android livewallpaper

So my livewallpaper just got over 250,000 downloads and what better way to celebrate than a massive update/improvement? Previously I was using java drawables to create my livewallpaper and although easy it was inefficient. I have now moved the code over and am using OpenGL ES to draw the particles which means (by a back of the envelope calculation) that I have got a 16x performance increase. This equates to no lag/delay when performing actions on the home screen (swiping left/right, opening draw, dialogs etc.). Importantly it also means that battery life will be improved. I will probably add a few posts on OpenGL android tips specifically for people moving away from java drawables, and links to a few good tutorials.

AND guess what else??? I’ve added multi-touch! Unfortunately as exciting as it is, it doesn’t translate well into a screenshot so you’ll just have to try the beta or wait for the release on the market.

How do I sign up for this awesome beta?
Just send me an email (beta at stealthcopter.com) or leave a comment below with a valid email (it wont be displayed on-site) and I’ll add you to my beta testers mailing list.

Android Market Links (FOR OLD VERSION, NOT FOR BETA)
If you don’t fancy the beta, but still want to install the livewallpaper you can install the old version and wait for the update (probably about 1 to 2 weeks away) either click the following android market links (in android phone), scan the QR codes or search the market for nexus revamped.
Pro Version
Nexus Revamped Pro Live Wallpaper (com.stealthcopter.nexusrevampedpro)

qr

Free Version

Nexus Revamped Live Wallpaper (com.stealthcopter.nexusrevamped)

qr

Read More

More Dead Zebra Android mini collectible figurines arrive

I have received some more dead zebra android figures from deal extreme following on from the green ones I got and my all the ones yet to arrive. Unfortunately as matto pointed out (and I suspected) these are fakes and are not produced by Dead Zebra. Dealextreme are slightly infamous for the amount of bootlegged products. The quality of the painted figures is poor, but better than nothing (imho).

Hi-voltagelink

Hi-voltage dead zebra android figure

Hi-voltage dead zebra android figure

Can see the black behind the yellow outline and arms are coloured slightly differently.

Copperbotlink

Copperbot dead zebra android figure

Copperbot dead zebra android figure

Line along middle of head doesn’t line up but overall quite good quality

Reactorlink

Reactor dead zebra android figure

Reactor dead zebra android figure

Overall quite good but again the arms don’t quite match, the glow in the dark is very cool though. Below shows photos of the reactor android figure under UV light and then it’s residual glow (apologies for my poor photography skills)

All together

Dead Zebra figures from dealextreme

Read More

Dead Zebra android mini collectible figurines

Note: These are not official deadzebra figures, they are fakes and some of the paintwork is poor, please see this post

I love the Dead zebra android toys but I’ve found that they are impossible to get a hold of any. Thankfully dealextreme have them in stock 🙂 each picture links to the dealextreme page for each android:

Most of the figures cost around $5 with some of them a little bit more $7.50 (suit, space invader, tribal). I’ll post an update with images when they arrive.

Read More

26 prisoners and a light bulb logic problem in python

I was sent a interesting logic problem by samsamsam which is as follows (or very similar):

Q: How can the prisoners tell, with certainty, that all 26 of them have visited the central living room with the light bulb.

Riddle:
26 prisoners are in solitary cells, unable to see, speak or communicate in any way from those solitary cells with each other. There’s a central living room with one light bulb; the bulb is initially off. No prisoner can see the light bulb from his own cell. Everyday, the warden picks a prisoner at random, and that prisoner goes to the central living room. While there, the prisoner can toggle the bulb if he or she wishes. Also, the prisoner has the option of asserting the claim that all 26 prisoners have been to the living room. If this assertion is false (that is, some prisoners still haven’t been to the living room), all 26 prisoners will be shot for their stupidity. However, if it is indeed true, all prisoners are set free. Thus, the assertion should only be made if the prisoner is 100% certain of its validity.

Solution

I won’t explain the solution in words as that might ruin it if you were planning on figuring it out, instead I have posted some python code that calculates the probability of number of days it will take.

# -*- coding: utf-8 -*-
from random import randint

bin=[]
binstep=50

# Loop 
for i in xrange(0,50000):

	nopris=26
	light=0
	count=0
	days=0

	# Create a set of prisoners with value 0 or 1
	# for having visited the room when light is off
	p=[]
	for i in range(0,nopris):
		p.append(0)

	# Until all prisoners have switched light on and have
	# been counted
	while count<nopris-1:
		x=randint(0,nopris-1)
		# First person to be picked is the counter
		if days==0:
			counter=x
			p[x]=1
		# Counter adds one if light is on and resets it
		elif x==counter and light==1:
			light=0
			count+=1
		# If light is off and prisoner hasn't turned light 
		# on before he does so
		elif p[x]==0 and light==0:
			p[x]=1
			light=1
		else:
			pass
		days+=1
		

	# Expand our bin if it isn't big enough
	while days>len(bin)*binstep:
		bin.append(0)
	bin[days/binstep]+=1	
	

# Just chucking data into a histogram type layout
# to speed up processing afterwards (I'm crap at
# openoffice stuff)
for i in range(0,len(bin)):
	print i*binstep+binstep/2,",",bin[i]

For 50k iterations I got the following output:

$ python prisoners.py
25 , 0
75 , 0
125 , 0
175 , 0
225 , 0
275 , 0
325 , 2
375 , 31
425 , 162
475 , 636
525 , 1659
575 , 3492
625 , 5448
675 , 7134
725 , 7755
775 , 7103
825 , 5758
875 , 4341
925 , 2884
975 , 1701
1025 , 909
1075 , 511
1125 , 255
1175 , 124
1225 , 63
1275 , 25
1325 , 4
1375 , 2
1425 , 1

Which shown as a histogram looks like:

Histogram for the 26 prisoners problem (50k iterations)

Histogram for the 26 prisoners problem (50k iterations)

Let me know how you’d improve this method or any other cool logic problems I can have a go at 🙂

Read More

Orange San Francisco (ZTE Blade) for £87.10 with cashback

Orange are offering a really nice large screen android phone for a great price, so I picked one up for my dad and flashed a custom rom onto it. They have dubbed the device the San Francisco, but it is otherwise known as a ZTE blade (specs on wikipedia)

How to get it for £87.10

  • +£12 Go through a cashback website like quidco and click through to the orangeshop
  • Once at the website goto orangeshop student select PAYG and enter your NUS code or just enter 000000000000000 they don’t verify it!!! for a 10% discount (this was a tip off from someone at droidcon, but I didn’t manage to catch name please let me know if it was you and you can have the credit)
  • £99 + £10 Topup Select San Fransisco in Gray or San Fransisco in White
  • -£9.90 Your 10% discount will now be applied ^_^ Choose which tariff you want, I chose dolphin as you get free internet and 300 texts when you topup £10
  • Total £87.10, win!

It’s a good phone and it’s very easy to flash a custom rom onto if you don’t like the orange one. I got the rom and followed the guide at modaco.

Read More

Review of day 2 of droidcon uk 2010

Following on from the review of the previous day at droidcon uk 2010, Here is a brief review of the second day at the conference. Apologies for the terrible photos and some fragmented text!

Again as this is quite a long post here is a mini table of contents to speed it up:

Excellence in the Android User Experience

Romain Nurik talks about creating applications with great UX and great UI, this follows on from a similar presentation he has posted up on slideshare.

Roman Nurik making android pretty

Roman Nurik making android pretty

Android reuse models

Mark Murphey discussed some of the ways in which we can reduce lots of android developers reinventing the wheel everytime we need something. There are a few methods that a developer can use for distributional:

  • Souce Code
  • As an Application
  • As a jar
  • Library
  • Combine the two above methods, and distribute a jar in a library. As we don’t live in a perfect world source code cannot always be distributed (Remember to create a licence)

Libraries can be used to solve problems for people who want free and paid versions of the app, and don’t want to maintain two versions of the code. Google have shown a google example by creating the LVL code as a library for app developers to use.

Resource name collisions can still be a problem, but this can be solved by using a prefix that is unlikely to be used by the child application. Mark shows an example of this in his color mixer widget that uses “cwac_colormixer” as a prefix. You can find lots of mark’s cool projects on his github: githubcom/commonsguy

Mark went on to discuss that we need a place to collect code to reuse and mentioned building a community website for this purpose, also saying “I can’t write a website to save my soul, I ain’t doing it!”

During the talk/questions, a great open source view was mentioned Swipe view by @jasonfry which is like view flipper but the animations between the views are not static and more like the home screen.

Make it fun

This was basically a demo of using the Unity 3D framework for creating applications that can be run on iphone/ipad/android/wii/computer. Seemed to have some cool features but I will let them do their own sales talk.

Monetize your apps in emerging markets

This was an interesting talk by a guy from movend who discussed the concept of marketing your apps to emerging markets. For a lot of people in emerging markets the phone is the only access to the internet, social networking, and gaming/entertainment device.

He had some intersting statistics on mobile phone payments. Asia Pacific accounts for $62.8 million in mobile phone payments and the rest of the world only accounts for $45.8 million. The market for mobile app revenue is estimated at $135million for 2009 and at $4 billion for 2010.

Market is extremely fragmented, android market does not exist in certain countries/handsets. Try to get your application pre-loaded onto a phone and target what specific users like. Apparently the Chinese like to play mmorpg the most. Micro-transactions are a great was to add value to a free application.

Android has a “dude” problem

Lady geek and ladygeektv

This presentation started with a great slide:

Ladygeek android penis

Ladygeek android penis


Only 5% women want an android phone whereas 50% want an iphone. She goes on to discuss why we as developers should care. Apparently women buy more gadgets than men, and between the ages of 25-39 there are more female gamers than men!

She then used this awesome droid advert as a demonstration of how android is currently marketed which contains the awesome quote of “Race horse duct taped to a scud missile, fast”

Android behind the scenes

Sony Erricson sharing some behind the scenes information about how they work on android.

They were constantly trying to remind developers that they are very open and are contributing changes upstream to the android project. They are interested in decoupling applications from android so that signature apps are built on top rather than into android. I believe they said this was the case for their sexy timescape view:

Sony Ericsson Timescape

Sony Ericsson Timescape

Sony Erricson want to be very in touch with devs and they don’t believe creating seperate communities will help anything and instead will provide support in current communities such as stackoverflow and google groups.

They briefly mentioned the Ericsson application awards 2011 which has a theme of “Connected things” and has 4 prizes of 15,000 each with phones awarded throughout different stages of the competition. They will also provide live beta testers to evaluate your application.

Other

We had a quick play on some of the cool new android tablets.

Android Tablet

Android Tablet

There were some free android usb sticks, which someone said were from orange but there was no branding on or nearby them.

Android 2gb usb stick

Android 2gb usb stick

Read More

Review of day 1 of droidcon uk 2010 (barcamp sessions)

Below is a short overview of some of the stuff that I saw a droidcon today (Day 1: Barcamp), I was hoping to write more but it’s late and I can always update this post. Apoloigies to those who I did not manage to get the names of, I can update this post when I find out who you are 😛

As this is quite a long post here is a mini table of contents to speed it up:

Schedule

Barcamp schedule (sorry for crap pic)

Barcamp schedule (sorry for crap pic)

Git on android

This was a really surprising talk, just by the name it’s a little confusing as to why this would be useful but it was a really good talk. A guy from who works at the guardian (need to find name) walked through all the problems he came across when trying to use git on android and how using open source goodness he could simplify a lot of trouble by simply extending pre-written code and even create work arounds for troublesome bugs.

It was a very interesting talk just to see how everything had fitted together and to see a demo of some sexy git-based syncing, including using some ssh agents securely.

Swing me

swingme
Draft still…too tired to write.
A single UI widget toolset that can easily be ported to other operating systems. Uses guestures pinch zoom all the things you would be used to. Non-android specific code and can specify protocols nicely to cooperate with different devices. Removes hassle on behalf of developer, debug using xml, then switch to binary mode for performance
.
Difference between keys on certain phones… assign buttons, like “back” as a button on phones with dedicated back buttons ie nokia soft key hidden and at bottom, android will hide it and use android hardware back button. IE. unhidden back button not hidden (good solving of problem)

Problems with accessing core bits of anroid but private/protected stuff. Radio easy but problem with tick box.
Missing clipboard (almost finished, work on android, symbian, desktop… lol @ apple)
Still use native android based stuff

Google Bootcamp 1

So there were four google guys present to answer the questions and complaints of the developers and one to pass the microphone around.

Google Barcamp 1

Google Barcamp 1

Someone asked when Gingerbread was going to be released and Reto Meier answered by not confirming anything regarding the release date, be it this year or next. He even went as far as to say that he couldn’t confirm gingerbread’s existence, despite the rather large statue outside building 44

Roman was asked a question about the Action bar and if it was going to become a standard widget in the android apk, he said that it wasn’t currently part of the widget set and couldn’t confirm when it would be added.

Reto mentioned about in app purchasing and said google was looking into other method to monetise can’t comment on specifics. However in app purchasing currently is against the google TOS, so you might want to be careful if your app has this and is distributed via the google market. Of course this is fine to do if released on to another app store such as and app, doubtful that orange and vodaphone app stores would be so generous.

Google tv was mentioned and how to write android on it. Currently only html 5 / web stuff but as it is based on android the plan is to be compatible. So we are waiting for compatability hopefully sometime next year. The google tv’s should receive market via OTA updates so there will probably be no need for OEM manufactures to get in the way. Media server such as a upnp server, status is currently unknown.

In app google analytics was mentioned and another barcamp talk was refered to which unfortunatly I missed, if anyone went to this and has written it up I am happy to add the link in here.

In app logic – services/content providers global = bad, shared prefs, instance state mainly for UI shiz. setters/getters saved pref/database on logic. check if its been set etc. roman/reto

Someone briefly asked about adverts without using the internet permission and instead using an addon/plugin which did access the internet. Currently it seems this is not possible at the moment but is something they may look into in the future.

Have I missed off any of the other topics discussed during this bootcamp, if so let me know!

Alternative Markets

Draft still…too tired to write.
Vodaphone – incentive – random draw to win a htc legend. 30 70 split
Orange – 30 70 again (yawn) want good apps, as many as possible pay via phone bill, no registeration, france/uk last year. need several countries/languages arabic/african etc.
Nokia – no alternative operators, content agregator, locilzation/adaptation/uploads etc… Sensing, in app billing

Individual / OS devs fetching market data/pulling to diff apps sotres as we dont have the time to move to diff places

App stores share with other stores, very nice
Orange apps tied to network you lose them if you move 🙁

Meta-Market Model

This talk tied in very nicely with problems regarding using alternative markets discussed in the previous talk. Mark Murphey (Commonsware) discussed an alternative to writing open letter to google (as was discussed via email) about the android market. He created a brain stroming session on the market problems and what can we can do as a community to help improve this for ourselves (devs) and for users.

Mark Murphey Meta Markets

Mark Murphey Meta Markets

Some of the good problems highlighted by people were:

  • Comment spam, and no way to “Reacting to punters” or dealing with users who are “dissing” all apps
  • Not enough screenshots / descriptions / add videos etc…
  • Searching the market is terrible (My contribution)
  • Analytics
  • Email messages about cancelled users every time
  • Refund policy too leaniant
  • Option to explain the reason behind each permission as users don’t know what’s going on when you can’t fit an explanation in the description
  • Better rating levels, UI/UX etc.
  • Downloads don’t work

The market on android is improving at a “Glacial pace” and even though there was some sexy stuff demonstrated at Google IO 5 months ago we are still waiting to see the improvements, such as a web based market that can push applications to devices.

There was also a good discussion about the websites that scrape data from the android market (appbrain, cryket, androidzoom)which is kinda sketchy territory as it is probably against TOS of android, kinda counting as pirated data. There is even a google code project to fetch the data from the android market.

Data goes in data doesn’t come out
Pirated data not supported by data cant rape data from market.

So what makes this presentation more than just a compaint about the android market?
Market is a closed club, OEM’s who don’t agree to the rule book don’t have access. And simply creating a app store for each carrier/OEM etc. isn’t a viable solution which Mark summarised with a brilliant quote: “those who complain about fragmentation you ain’t seen nothing yet”.

So Mark has come up with an idea about having a single open feed of android applications that all the market applications can hook into. So this would work as some sort of extended atom/rss feed (just add namespace) with open access which could benefit from the standards introduced and the maturity of the software already written. This sounds like a great idea but will obviously need a large amount of momentum to succeed, Mark is obviously a major player in the android field and this proposal was backed up by the developer of AndAppStore.

Mark also mentioned that even market owners who were unwilling could be worked-around using a firefox plugin to remove most of the leg work. So this would mean that developers can have a single place where they have the app description, screen shots, all the minimums required for android market but more for those who support more.

To wrap up mark said that instead of us complaining at google to fix the market we should fix the market problems ourselves. At the end of the session Mark was collecting email addresses to create a mailing list with regards to the start of this process.

How I do it

Kevin McDonagh of Novoda gave some brilliant tips and tricks for writing android applications. I’ve written some of them up, but hopefully he will publish his whole list online (hint hint…)

@Override
public void onLowMemory(){
super.onLowMemory();
// Code to execute on low memory
// Free up unused drawables etc.
}
  • Use weak references
  • Avoid Generics, use primitives where possible
  • Clean up drawables onPause()
  • Use the heirachy viewer

Kevin also mentioned some stuff which I’m sure I should have come across before but for some reason I was still oblivious to.

Extending styles to avoid having to retype android:height=”wrap_content” etc. on every item.

There was some good discussion on the conventions for android:versionCode and android:versionName and someone mentioned very helpfully that versionName appears in the market description and is limited only to 255 chars, which means you can add additional versioning changes into this (shown below a screen shot of nexus revamped in the market with the versionName highlighted).

android:versionName displayed in android market

android:versionName displayed in android market


Apps for good
Apps for good is a charity that gets a group of people between the ages of 18 and 25 and gives them the resources and skills required to create an application that can benefit society. Once students have finished the course they often go on to mentor the next batch of students.

The apps they have already produced on this scheme are Stop and Search StudentVoice StudioPhly and they discussed a up and coming app they are working on currently so that the balance of an oyster card can be checked via a android device so that you are never caught out.

They are looking for help so if you are feeling charitable I am sure they would appreciate your input or if you know of anyone 18-25 who would like to go on the course, please inform them of the opportunity.

Google Barcamp 2

Ok, so this barcamp was delayed and I think alot of the better questions were already asked, that in combination with my laptop battery dying mean I have less notes and worse memory about this one.

Google Barcamp day 2

Google Barcamp day 2

Bundling several apps into one installer apk, currently not possible. Could be achieved by having a program that sends intents to install other apps, or by having one large app with serveal launcher items in the app menu.

Tips from tech hub:

  • Devs arn’t always design focussed, should assume users are complete idiots and don’t understand anything.
  • Ported apps don’t act in an android style – back button doesn’t close etc, as devs don’t understand application lifecycle


App Circus
So app circus had a bit of a disappointing number of contestants, about 6 I think it was in total hopefully next time there will be more. The winners were

  • 1st: Swiftkey
  • 2nd: — Blind something? Sorry forgot the proper name
  • 3rd: ProductPay


Rest

Coding in a hammock and drinking beer

Coding in a hammock and drinking beer

I also met a lot of very interesting people and plan on meeting a whole load more tomorrow!

Read More