December 30th, 2009 @ 7:31 pm

Word of warning before we start, this goes against the standard Android UI and should only be done when you are certain it is appropriate.
To handle screen rotations such that your activity doesn’t get destroyed and restarted do the following:
// Handle Screen Orientation (Stop Activity being killed and re-started)
@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
}
Tags: Android, Screen Rotation
Posted in Uncategorized | No Comments »
December 30th, 2009 @ 5:27 pm

Your making an Android app and want to take advantage of Google Maps, you’ve been bashing your head against the desk attempting to work out what is going wrong.
So welcome to this little checklist of things I’ve forgotten to do when doing this task:
This should get you up and running with lots of mappy goodness.
Tags: Android, Google, Maps
Posted in Uncategorized | 2 Comments »
December 28th, 2009 @ 5:19 pm

Today I was playing around with the facebook api and needed to extract the date and time for each event. When you look at the value from the api call, you get something along the lines of:
1262028000
For the date of the event from the facebook event page, is 28th Dec 09 11:20, so what is the result above all about? Well it’s Unix Epoch Time representation of the time, however the wonderful folks of facebook convert the time into pacific time, before then converting it to Unix Epoch time. So in php to extract the date/time in your local time zone do the following:
date_default_timezone_set(‘America/Los_Angeles’);
$startDate = date(‘d m Y H:i’, $eventInfo['start_time']);
and this will give you a time like this:
28 12 2009 11:20
I can’t take any of the credit for this, all of it has to go marc2003 over at forums.overclockers.co.uk.
Anyone looking for more info on handling facebook events api I strongly recommend this site – http://www.phpeveryday.com/articles/Facebook-Programming-API-Events-P852.html
Tags: Date, Events, Facebook, Time
Posted in Uncategorized | No Comments »
December 9th, 2009 @ 11:28 pm

After attending one of the Google Developer days in London, I couldn’t help but think that Android is going down a bit of a bad road, taking away some of the simplistic things that made it such a perfect platform to develop for.
So in the good old days of Android, you downloaded a single SDK and everything worked, now you have to download it, and then run an application inside the SDK to install the required versions of code (which actually wasn’t all that obvious to me when I needed a new install of the SDK). But as the day progressed and I got to play with a load of devices, you quickly see that the OS versions on each device become a big problem. (more…)
Tags: Android
Posted in Uncategorized | No Comments »
0