March 2011 Archive

Android Navigation Using Google Maps

March 30th, 2011

My app links to Google Maps navigation by sending the start and end points to Google Maps using ther following code.

String directions="http://maps.google.com/maps?saddr="+startlatitude+","+startlongitude+
"&daddr="+endLatitude+","+endLongitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
intent.setData(Uri.parse(directions));

This works fine and launches Google Maps. However I had another intent that was launching without knowing the current location. I wanted Google Maps to get the location for me but couldn’t work out how to force Maps to use my location as the start point.

As it turns out the solution was obvious, if you dont send the start address parameter Maps assumes you mean from the current location so the code becomes this.

String directions="http://maps.google.com/maps?daddr="+endLatitude+","+endLongitude;
Intent intent = new Intent(android.content.Intent.ACTION_VIEW);
intent.setData(Uri.parse(directions));

This opens Google Maps with ‘My location’ listed as the start point so you have to then press the ‘Go’ button but saves me the effort of getting the location first.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

HTC Store in Copenhagen

March 27th, 2011

image

Looked around the new HTC concept store in Copenhagen yesterday. It’s a small store but it was still nice to be able to look at the new phones especially when many phone operator shops only have non working dummies.
Looked at the the HTC Incredible S and have to admit it’s very well put together and the build quality is great.
Still I’m happy with my Desire and I’ll wait until the next generation of phones with qHD displays come out.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Server MIME Type for Android APK files

March 9th, 2011

I uploaded my test Android App to my website but found that the server was just treating the file as plain text so it just appeared in the browser as a regular page.

To force the app to download through a browser was very easy, just edit your .htaccess file to add the following line (assuming you use Apache of course).

AddType application/vnd.android.package-archive apk

Now the phone browser will force a file download so it can be installed by the app installer, easy.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

HTC Desire Proximity Sensor Update

March 6th, 2011

After writing about this problem and seeing that the fix I thought worked didn’t really, I decided to return my Desire to 3 Denmark to be fixed.

It could well be that I could have fixed it myself but since the phone was under warranty I didn’t see the point.

It could take up to three weeks to fix but at least they lent me a phone to use in the meantime. It’s a Sony Xperia X8 mini and takes a bit of getting used to after using my Desire. Typing on a 2.6″ screen was very difficult but installing the Swype beta made life much better. I also did them a favour by upgrading the phone to Android 2.1 since it came with Android 1.6 installed.

At least I got to test my own App on the phone running 1.6 and it worked perfectly.

Google BookmarksEvernoteGoogle GmailHotmailWordPressLinkedInFacebookDeliciousShare

Switch to our mobile site