January 19th, 2010 @ 12:50 am
I watched a small part of the government discussions about the bill to handle file sharing and I was slightly taken back by the lack of knowledge of p2p (peer-to-peer) networks and how they work (many discussions of blocking websites on a users computer or router), now I’m not going to start with how incorrect this is, but rather discuss how p2p networking could be tackled to only support legal content.
Read more »
January 4th, 2010 @ 12:38 am

This phased me for quite sometime, how do I use a widget like a button, or a view as an overlay?
I asked on the Google Groups, got a great reply from Mark Murphy, and he explained about how you can use relative layouts to add views on top of the map view and set x, y coordinates and use z ordering.
I started to think about what the MapView was, then a quick look at the API and bam, addView.
Read more »
January 4th, 2010 @ 12:24 am

I’ve spent probably the best part of a couple of days attempting to get Proximity Alerts working in Android. There are a large number of Google Group threads, all leading to essentially someone saying it still doesn’t work. There was one or two that had working solutions, or some who managed to get it working to a certain degree.
I managed to get a working implementation of proximity alerts by combining the information from a number of threads, this is just a guide through what I learnt and should get you up and running with your own alerts.
Just for the record, I need to learn a great deal more about Intent Filters and Broadcast Receivers as my knowledge of them is fairly vague, so please correct me in the comments if I say anything wrong, or should be implementing things differently.
Read more »
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:
- In your AndroidManifest.xml file go to the Application tab (Assuming you are in Eclipse, Manual programmers can still use this info, but will need to work out the corresponding xml), then under Application Nodes select the Activity you want to stop the rotations on, on the right hand side under “Attributes for <Class Name> (Activity)” scroll down to Screen Orientation and set it to portrait or landscape.
- Then in the same section set config changes to “orientation|keyboardHidden”
- Now back in your class add the following function and you’ll be good to go.
// Handle Screen Orientation (Stop Activity being killed and re-started)
@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
}
// Handle Screen Orientation (Stop Activity being killed and re-started)
@Override
public void onConfigurationChanged(Configuration newConfig)
{
super.onConfigurationChanged(newConfig);
}
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:
- Right click on your project in eclipse and go to properties. Then under Android select Google APIs with the correct platform number, click apply then Ok
- Open up your Android Manifest file, under the application tab scroll to the bottom and under the Application Nodes click on Add, then double click on “Uses Library”, now for the name enter the following – com.google.android.maps
- Your activity which is going to be displaying the map isn’t a plain old activity, it needs to be a MapActivity like: public class MapExample extends MapActivity
- Finally your map view in the layout file should look something like <com.google.android.maps.MapView android:id=”@+id/mapview” android:layout_width=”fill_parent” android:layout_height=”fill_parent” android:clickable=”true” android:apiKey=”YOUR_API_KEY”/> where your api key can be found by doing as mentioned on the Google Maps site -http://code.google.com/android/maps-api-signup.html
This should get you up and running with lots of mappy goodness.
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
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. Read more »
November 26th, 2009 @ 10:54 pm

I read an article over at Ubuntu Blogspot about the Lucid Lynx release and some of the plans
One of the things that caught my eye was the above diagram showing off the Ubuntu One service. While it’s already included in Karmic Koala, this diagram indicates to me that they are going to push it a little further, leaving it in the background for now for users to play with and route out any bugs.
Read more »
October 31st, 2009 @ 6:04 pm

Wheres my contacts version 1.8.0 is now available on the Android Market.
This version is alot more stable, offers a few more options for unlinking and removing photos from facebook.
Read more »
October 30th, 2009 @ 12:23 pm
Go to Settings > Applications > Unknown Sources
Then just visit the appropriate link in the Android Browser
1