Sunday, July 27, 2008

Joe Hewitt, has produced a really simple set of javascript and css files to build a web-based iPhone style template.

photo

I’ve taken the liberty to turn these into a ASP.NET component.      I’ve also adapted Joe’s work so that I can load an RSS feed using AJAX.

Joe’s done a great job.     You can get the original templates here -

http://www.iphoneatlas.com/2007/07/06/the-iphone-web-app-navigation-template

Or to see my implementation look at

www.binaryrefinery.com/i

If you view source you’ll notice that all the files you need are as follows -

default.aspx
iPhoneArrow.png
iPhoneBackButton.png
iPhoneButton.png
iPhoneGoButton.png
iphonenav.css
iphonenav.js
iphonenavajax.js
iphonethumb.png
iPhoneToolbar.png
loading.gif
pinstripes.png

 

To make things simple,   I’ve put these into a ZIP which you can get from here -

www.binaryrefinery.com/i/template.zip

 

Technorati Tags: ,,
Sunday, July 27, 2008 7:11:35 AM UTC  #    Comments [3]  | 
Saturday, July 26, 2008

So of late, I’ve been building lots of mobile applications that work by calling web-services.   I’ve found myself time and time again passing the same parameters to each web-service function.

This was getting a bit boring,  so I decided it was time to try and take the pain out of this repetitive process.   

I’ve decided to now pass a standard class filled with useful parameters each time I make a web-service call.

 

So take the call to Login  I now do the following -

lr = ra.Login(OURUSERID, Elements.BuildIn());

Now this doesn’t look that unusual, passing in the userid, we want to authenticate.

Elements.BuildIn(),  is where all the action is at.   This ensures we pass in a whole bunch of useful information and is as follows -

 

public static WSIn BuildIn()
      {
          WSIn ret = new WSIn();
          ret.BluetoothOn = Elements.BlueToothEnabled;
          ret.Company = Settings.Company;
          ret.Printer = Settings.Printer;
          ret.Profile = Core.AppSetting("profilename");
          ret.SoftwareVersion = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
          ret.User = Globals.Instance.UserID;
          ret.AppName = Core.AppSetting("AppName");
          ret.Location = Settings.Location;
          return ret;
      }

 

I do this for each call,   so we always get passed to the web-service  that location of the user,  their company ,  the software version, whether they are using a Bluetooth printer etc.

This saves a tonne of time.

Saturday, July 26, 2008 1:41:32 PM UTC  #    Comments [0]  | 
Monday, July 21, 2008

I came across this nifty bit of code that will work out location from IP address.    In May I talked about adding Meta tags to your website to allow this facility.

See

http://www.binaryrefinery.com/main/PermaLink,guid,0afcf545-5412-4815-8129-4f44108b7c43.aspx

 

You can see how it works here -

http://msdn.microsoft.com/en-us/library/aa907670.aspx

 

Try it for yourself here -

http://maps.live.com/WiFiIPService/locate.ashx

 

I’m not 100% convinced its using the meta tags described above,  but it seems to be working for me.

Monday, July 21, 2008 10:55:49 AM UTC  #    Comments [0]  | 
Saturday, July 19, 2008

Just back from seeing Disney Pixar’s Wall-E.   Time I thought to go make one out of Lego…

I have some stiff competition…

http://gizmodo.com/5020266/wall+e-animator-tops-everyone-who-ever-wanted-to-make-a-lego-wall+e

Saturday, July 19, 2008 8:58:46 PM UTC  #    Comments [0]  | 
Wednesday, July 16, 2008

Just saw, this which looks cool

http://news.bbc.co.uk/1/hi/technology/7440658.stm

Wednesday, July 16, 2008 1:57:40 PM UTC  #    Comments [0]  | 
Saturday, July 12, 2008

So your running either Exchange 2003 SP2, or Exchange 2007 and you want to synchronise your iPod Touch or iPhone (standard/3G) , for mail, contacts and calendar?

If the answer is YES, then read on.     In the past you had to put up with IMAP or POP access to Exchange which did the job, but was fairly limited.

So with the advent of Firmware 2.0 for iPhone/Touch you can have full support for synchronising using the full push ActiveSync Airsync mechanism.

 

Right lets get started.     The first thing you need unless you have an iPhone 3G is to upgrade the firmware to version 2.0.    This can be done using iTunes and there is a small cost to-do this for the iPod Touch.   

Of course you need to have an Exchange server already setup to synchronise with mobile devices.   So its a good bet to make sure Windows Mobile devices can currently synchronise before you end up getting very frustrated.

So what do you do on the device?    I’ll walk you through what I did on an iPod Touch, but its the same process for the iPhone.

I used the new screenshot functionality of Firmware 2.0 to take these screenshots,    you press the top button and home button together and it saves the screen to the Photo’s application.

OK,   so the first step is to go in Settings from the home screen as follows -

image

Select Mail Contacts, Calendars.

image

Lets next tap Add Account

image

Tap Microsoft Exchange

Ok, so far so good, now it gets interesting.

image

Now,  unless you have email auto-discovery switched on, on Exchange (and I haven’t found anyone outside Microsoft that does),   in the email address type something that isn’t an email address,  e.g in my example I’ve type dummy (you can change it later).    This is an important step,  as if you really type in an email address the iPhone/Touch sits for ever trying to verify the address and you are never prompted to enter the address of your server.

The username is your windows domain followed by \.   The \ is difficult to get on the iPhone/Touch keyboard.     Press [.?123] key  , then [#+=] key ,  and you’ll see it.

Ok,  make sure your username and password are correct.   The password is case sensitive but the username isn’t (but remember the \ ).

 

image

Ok, now its time to type in your email address the Internet address of the server your synchronise with.    Note you don’t need to prefix it by http:// or https://   for help with what this address is look at ActiveSync on an Windows Mobile device that synchronises already in your organisation,  or ask a friendly IT admin (yes they do exist :-) )

Almost done…

photo (6)

What do you want on your device, Mail, Contacts and Calendar?    I’ve found that most things work OK.     The biggest omission is that iPhone/Touch is that you can’t access the Global Address List (GAL),  like you can in Windows Mobile.

 

image

That’s about it,  your all ready to receive email.

Go check your email….

I always found that you can now change the email signature (within settings) so that it doesn’t reveal to your corporate IT that you sent and email from your Iphone/Touch, which I think some may find a good feature.

 

Saturday, July 12, 2008 12:16:13 PM UTC  #    Comments [3]  | 
Friday, July 11, 2008

Today I had to spend a couple of hours resolving some bugs.     My life has got a whole lot easier once I realised that you can debug not only a Windows Mobile app (and we all know how to do that),  but the web-services it calls too.

If you start debugging your web-service using the inbuilt debug web-server in Visual Studio,  then up will come Internet explorer showing an address like

http://localhost:62446/yourwebservice.asmx

If you make a note of the ip-address of your machine (say mine is 192.168.0.3)   then in your mobile application,   change the url of your web-service to be

http://192.168.0.3:62446/yourwebservice.asmx

Then run the mobile application in debug mode too.  If all goes to plan, you can debug both the mobile application and the back-end complete with break-points and all the normal bells and whistles.   Sorted…

Friday, July 11, 2008 9:18:49 PM UTC  #    Comments [0]  | 
Friday, July 11, 2008 9:12:05 PM UTC  #    Comments [0]  | 

I’m pleased to announce,  that my blog has been short-listed for the Computer Weekly Blog awards.

ComputerWeekly.com IT Blog Awards 08

Please if I could trouble you to vote, I’d appreciate it -

I’m in the Wireless and mobile blogs category (up against Jason Langridge no less)

http://www.computerweekly.com/blogawards.htm

Friday, July 11, 2008 8:54:06 PM UTC  #    Comments [0]  | 
Tuesday, July 08, 2008

So, I’ve updated the location sending program to not only transmit, your current location (with a map),   the distance from a point of interest (work, home etc) but also attach a photo.   Particularly useful to let your boss/customer/wife know your stuck in traffic.

Download here – www.binaryrefinery.com/main/content/binary/gpsphone.cab

Tuesday, July 08, 2008 8:23:45 PM UTC  #    Comments [0]  | 
Saturday, July 05, 2008

So, today was the day.  275  Balloons launched (all bio-degradable).    They went sailing out to the East.

The map is live showing all our balloon finds using Microsoft Virtual Earth.  www.racingballoon.com

 

CIMG1178

Thanks To Chris, Carl, Trudy, Hannah and my Mum & Dad for helping me out today.

 

Let the race begin…

Saturday, July 05, 2008 7:38:06 PM UTC  #    Comments [0]  | 
Wednesday, July 02, 2008

This was interesting,  I was sitting on my sofa tonight just playing around with Google Maps on iPod Touch.    I clicked the locate me button (which had never worked before) and it zoomed right in to my exact location.

Slightly freaked out I pieced together what had happened and why ‘locate me’ was suddenly working with smart bombing precision.   Looking around I couldn’t see anyone pointing a laser targeting device at my house, so I cam up with the following.

If you remember about a month ago I posted about add geo-encoding information to your website here.

We’ll it all makes sense,   Google had indexed my blog found the geo-encode information in the meta tags of my blog/website.

The final bit of the jigsaw,  because my public IP address is the address of my router and traffic I generate from my home network (i,e from the iPod) appears to come from my base public ip.   This public IP is also the address of my blog.

So…   Google could easily relate my IP to my location.      I hope I’ve got the trail correct, but its well worth doing what I did and putting those meta tags on any web-page you host.    

I would give you a screenshot but still no simple way to-do so off an iPod/iPhone.  Come on SOTI guys :-)

Wednesday, July 02, 2008 7:12:54 PM UTC  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: