Friday, May 30, 2008

I've updated my GPS mobile phone positioning application that lets you post your position along with a map via email.

I've just added the ability to include a quick text comment, to your positioning email such as -

'On My Way'

'Meet Me Here'

'I Am Currently At'

 

Or of course you can type in your own.   Anyway let me know what you think.

 

Download HERE

Friday, May 30, 2008 12:25:16 AM UTC  #    Comments [1]  | 
Thursday, May 29, 2008

Heard a fantastic programme on Radio 4 this morning all about probability.

Geeky fun, but kind of cool (all in the same sentence)

Cheer yourself up and just listen to this..

http://www.bbc.co.uk/radio4/history/inourtime/inourtime.shtml

Thursday, May 29, 2008 11:16:38 PM UTC  #    Comments [0]  | 

Further investigation today of NAV 2009's web-service architecture has lead to some amazing findings.

First there's abstraction,  something like get me a list of all items on an Item Card can be expressed as simply as -

        public test[] GetAll(int rowsback)
         {
            test_Filter[] filters = new test_Filter[0];
            return Binding.Find(filters, "", rowsback);

        }

 

Need to mass insert a load of records? -

       public void BulkInsert(test[] rec)
       {
           Binding.InsertAll(ref rec);
       }

 

Need to quickly locate a record from its key? -

       public test GetSingular(string no)
       {
           return Binding.Get(no);
       }

 

Just think how much SQL you'd need to type to achieve this...   Furthermore its all strongly typed, validated and all mapped correctly.

This is truly staggering.   Performance even on machine with 2gb of ram running Virtual PC, Visual Studio 2008, Mobile Device Emulator manager seems pretty good too.

 

Technorati Tags:
Thursday, May 29, 2008 9:16:10 PM UTC  #    Comments [0]  | 
Wednesday, May 28, 2008
Wednesday, May 28, 2008 7:51:40 PM UTC  #    Comments [0]  | 

image

Its amazing to see just how much functionality is now available within NAV's 2009 web-services.

Stuff that was previously next to impossible or just fell into the too difficult category.   Here's a great example.

I've consumed the NAV Item card as a web-service.    I don't just get field names,  oh no...   There's more, WAY more.     Look at this,  I've got valid values or what we call in .Net enumerations and NAV guys call option fields.

image

I've never had it so good. (or maybe I should get out more)

Super....

 

Technorati Tags:
Wednesday, May 28, 2008 4:59:16 AM UTC  #    Comments [0]  | 
Tuesday, May 27, 2008

Today for me was historic.   For the past few years building mobile line of business solutions with Microsoft NAV meant hard graft.    Mimicking  functionality in .Net that NAV had built in, second guessing how functions inside NAV work and writing data straight into SQL bypassing all of NAV's validation.     We'll things for me changed today in that I was finally able to get a glimmer of things to come.  Using the Virtual PC image that provides a preview of NAV 2009 I was able to call directly into NAV using its new inbuilt web-services functionality.   

So here's how you do it.

First get the Virtual PC 2007 image at Partner Source.   You'll need to be a MBS partner to get this.

One done follow the instructions to get the Virtual Server up and running.    The instructions explain all this better than I could.   Finally logon as administrator.

Ok, over to my instructions.   First we need to start the web-services server.    You should find the start web-services icon on the desktop -

image

Ok,  next we need to expose something in NAV that we want to use.   Lets go for broke and use the Item card.    On the start menu,  launch the SQL NAV program.

When NAV starts up open the object designer and navigate to the 'Web Services' table as follows -

image

Run the Web Services table,   I've added a single row with a service name of test, publishing object ID 30,  which is the item card.   My resultant record looks like this -

image

Ok,  that's about it from the NAV side.

The final thing you need to-do is establish the IP address of the virtual server.   I did this by running ipconfig in a DOS box.

 

OK,  now over to .Net  I built a sample mobile application and added a web-reference to in my case -

http://10.2.62.18:85/dynamicsnav/ws/CRONUS_International_Ltd/services

 

I'm going to skip over a few of the details here, but here is a snippet of my code to produce a list of items

 

       nav2009.test_Binding  ourws = Elements.WS_binding();  // < get a reference to our web-service setting the credentials and the URL
       nav2009.test_Filter[] filters = new test_Filter[1];  // < setup a dummy array of filters, to get all items
       filters[0] = new NAV2009Mobile.nav2009.test_Filter();
       filters[0].Field = test_Fields.Description;
       filters[0].Criteria = "";

       this.dataGrid1.DataSource = ourws.Find(filters, "", 14); // < go get first few items

 

Final result is a very easy to accomplish list of items, aka THE MONEY SHOT -

 

image

 

Tuesday, May 27, 2008 8:15:10 PM UTC  #    Comments [1]  | 

People don't believe when I say I run this blog from a PC pretending to be a server running ontop of my fridge.

Well doubters...

 

CIMG1097

 

Please note,  carrier bag full of fridge magnets and strange collection of plastic trays perched next to broadband router,

The only bit of 'glam' is the small LCD screen that rolls around RSS news, weather and how many www.racingballoon.com tickets have been sold.

Tuesday, May 27, 2008 6:58:52 PM UTC  #    Comments [0]  | 
Saturday, May 24, 2008

Hi all.   So its finally upon us.   I'm hosting my first helium balloon race on the 5th of July.  

We are raising money for Watebeach Community Primary Schools swimming pool repair fund,  which need to find £40k.

image

So,  we're going for launching as many balloons as we can.     If you're interested in donating a couple of pounds, with each pound buying you a single balloon in the race,  have a look at -

www.racingballoon.com

 

On the 5th of July (and I'm praying) the virtual earth map of balloon finds gets switched on and we launch all balloons.   We should see in real-time as balloons are found and their location.

Microsoft are providing the prizes (thanks guys) for the finder of the furthest travelled balloon and the winning launcher.   Sorry to report its not an Xbox 360 :-(

One last minute addition made to the project is that when you buy a ticket you can leave a message that the finder of your balloon will see.

Saturday, May 24, 2008 9:04:55 AM UTC  #    Comments [1]  | 
Thursday, May 22, 2008

This is useful.    This is the url composition settings to draw maps using Maps.Live.Com

i.e

http://maps.live.com/default.aspx?cp=37.814692~-122.477339&style=o&lvl=1&tilt=-90&dir=0&alt=-1000&scene=1140291

 

Full reference of how to build the query strings is here -

http://help.live.com/help.aspx?mkt=en-us&project=wl_local&querytype=keyword&query=url

Thursday, May 22, 2008 2:37:48 PM UTC  #    Comments [0]  | 
Wednesday, May 21, 2008

After posting last week about the ability to email your current location, I have inundated with requests and improvement suggestions.

image

The top ask, has been the ability to send your location to not just an Exchange email account but to a POP account such as Gmail, Yahoo etc.

So your wish is my command you can download the new version HERE

Wednesday, May 21, 2008 5:04:29 PM UTC  #    Comments [0]  | 
Saturday, May 17, 2008

Let me start off saying,  this isn't an original idea...   

But now that we're getting more and more mobile devices with built in GPS's or ability to triangulate their location.

I'd like to be able to post a text message not just to a person but to a location.    i.e I'd like to post a restaurant menu in space outside the restaurant so that I can browse it on my device when I get near.

Similarly, I'd like to have my agenda arrive to me when I pass a certain part of the railway line on my way to work.

Imagine what would happen,  if you used this to alert all motorists to accidents this way (or would it cause lots ?).    Anyway,    surely this is a perfect little Windows Mobile app. to be written.    Time to write some code....

Saturday, May 17, 2008 7:07:22 PM UTC  #    Comments [0]  | 
Friday, May 16, 2008

Always in search of a good community activity.    This year,  I am running a balloon race for our village fate.    You know the type of thing lots of children buy a ticket.  Ticket gets attached to helium filled balloons and they are all launched.    The furthest found balloon results in a prize for both the ticket holder and the person who finds the balloon.

 

So,  how may you ask,  has this got anything todo with mobile line of business?       We’ll I’m going to use a Virtual Earth map on a website  to plot where all the balloons land.   Rather than the people that find the balloons posting their found ticket back   I’m going to have them register their find on the website also.   Anyway,   the website is up and running in test mode at the moment   with a launch date of the 5th July.    All proceeds are going to rebuilding the swimming pool at our children's school.    I'll let you know when the website is live so you can all go have a look.    Oh yes and the mobile bit.   All balloons are carrying a barcoded tag so we can spot check them at anytime using a Windows Mobile scanner.

Friday, May 16, 2008 10:46:18 PM UTC  #    Comments [0]  | 
Thursday, May 08, 2008

I've been working on this for a little while now.   Ever get asked when your out and about "where are you?".    We'll if you want to be truthful and really report back really where you are here's a little app that does just that.

image

 

With a GPS connected phone,   you've potentially got access to SAT Nav and all of that good stuff.   However its harder to notify someone of your exact location.   

Using the Windows Mobile GPS intermediate driver,   its a easy to build a mobile application that will talk to any Bluetooth, internal or SD card GPS receiver.

I've made the application so that you can store a number of your contacts email addresses from the Pocket Outlook address book, so its quick to find who you want to send your location to.     In addition  you can setup a number of Points Of Interest (POI's).    These POI's can be for locations such as 'Home', 'Work',  'Train Station' etc.

You can then send a message to one of your recipients with optionally the distance from one of your POI's.   i.e you can send your wife an email with your distance from home (and a live map).   Its limited at the moment to using Exchange as the email transport.

 

image

Finally the email that you get send out contains a link to a map with exactly where you are -

image

So if you like the idea of this little app.  You can download the Windows Mobile 5/6 Standard version (aka SmartPhone) version  HERE

You'll need the SQL Compact 3.5 runtime on your device,   which you can get HERE

If you haven't done it already on a Windows Mobile 5/6 phone to configure the GPS Intermediate driver you need the settings tool,  which I've put a link to HERE 

Its a good idea to click these 3 links on your phone,  to save you the bother of having to copy them over from your PC.

I make no claims for reliability, this is very much a work in progress, let me know what you think by sending me a mail (richard@binaryrefinery.com)  or adding a comment.

 

Technorati Tags: ,,
Thursday, May 08, 2008 12:49:22 PM UTC  #    Comments [2]  | 
Wednesday, May 07, 2008

Today's been interesting.   I've been deploying a mobile line of business solution to a customer who is deploying their application to a geographically dispersed (i.e all over the place) audience using both GPRS, WIFI, HSDPDA and Wired Lan.   

They are using a combination of devices ranging from Symbol scanners, to Windows Mobile phones with Bluetooth barcode scanners and mobile Zebra printers.    So here's my top ten tips to help you get through the pain of Compact Framework rollout like this.

1) Centralise

Centralise all of your device deployment - I use a single website to host of of the applications CAB Files.

2) Save your bacon

Implement a global exception handler so if your application does go POP,  you can call a web-service that will send you an email.    Know about problems before your boss does :-)

3) Remote Support

Having a tool like SOTI in your toolbox is invaluable.   I let end users see their IP address on an About window,  so you can quickly establish a SOTI Pocket controller connection to see what's going on, on the users screen.

4) Manage Version Updates

Things will go wrong/people will request changes.    Ensure you have a mechanism to automatically deploy revised versions of your software.    This will save you BIG time in the long run, not having to recall devices back.

5) Test Environment

Keep things easy for yourself have a separate test environment.  Also automate the procedure of rolling changes without intervention from test to live.   This is possibly a statement of the obvious, but in high pressure situation where an end user has encountered a problem you don't want to be hacking out changes into live.

6) One Version Of The Source

I hate maintaining separate source for different sceneries.   One size may not fit all, but it will save you a hell of a lot of time if you've got only one application to change.

7) Lock It Down

If your doing mobile line of business know your audience.   It may be ok if your deploying to power users on their Windows Mobile phones that's one thing.   However if your deploying to ruggedised devices that need to work around the clock hide start menus,  make your application start on device power up.   I also add password protection to settings screens to stop the casual 3am attempt to change stuff on the device.

8) URL's

You'll probably be working in different network environment some people on the network other people connection over the Internet.    Ensure a good policy to cope with resolving server names on devices.   I use the concept of profiles in a configuration file.   i.e a device can be set to be 'Working On LAN',  which will use an local IP address to resolve the server.   Whereas a profile of 'Internet', will use the external fully qualified Internet DNS name.

9) Clocks

This will let you down, time and time again.   You cannot rely on device time clocks to correctly write a timestamp onto a record.    Make sure if you have to write a timestamp in your .Net Compact Framework application you have synchronised the clock of your device to the server (search my blog on how to do this).   Better still always write your timestamp's in on the server side.

10) Configure By Data

Its way easier to have screens that are driven by data rather than coding in how things should operate.   Its way easier to put records in a database to determine what happens out on the device rather than having to change code.

 

Anyway my top 10 list works for me and I hope it helps you.

Wednesday, May 07, 2008 11:42:03 AM UTC  #    Comments [0]  | 
NOMINATE ME
Please
Nominate me in
Wireless and Mobile

 

Wednesday, May 07, 2008 10:56:47 AM UTC  #    Comments [0]  | 
Friday, May 02, 2008

I love this.   A couple of pinvokes to make two applications talk to each other.

To send messages to another application you need the following -

[DllImport("coredll.dll")]
  public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);

  [DllImport("coredll.dll")]
  public static extern int SendMessage(IntPtr window, int message, int wparam, int lparam);

Which respectively allow one application to get the window handle on another,  then send a message.

One the receiver side,  its a snap just override the following -

protected override void WndProc(ref Message msg)
{

}

I'm not really filling in all the gaps here I know, but I'll let you explore it works really great.   

Friday, May 02, 2008 10:03:43 PM UTC  #    Comments [0]  | 

Theme design by Jelle Druyts

Pick a theme: