This site uses cookies. By continuing you accept the use of cookies.I Accept

A few minutes ago Mindbite released its very first Android App. This is of course celebrated by our little Plushie “Andie”.

image

The App is a port of Viltolycka, previously released for both Windows Phone 7 and iPhone. It’s developed in Java using the Eclipse IDE. For this project we had to transform all features to the Android Design Guidelines, and we think of it as quite the success.

The Design

It contains three views; The Map, The Accident Reporting and The App Information. We used the design guidelines for Android 4 (even though it’s released for Android 2.1 and above), and found inspiration for the navigation pane.

image

The navigation pane holds the three views. The first area is considered the most important and contains the map where accidents are displayed along your route. Therefore we made it wider than the other two.

image

The Map

The map displays your current location and at given intervals it connects to our Web Service at www.viltolycka.se and asks for accidents nearby. If accidents are found they are displayed on the map. If three or more accidents are found nearby, the app will sound an alarm.

The Project

The Viltolycka project is driven by Rikspolisstyrelsen (Swedish Police Board). Mindbite has been involved with development for this project for over two years now. Since the start we have delivered a website with a back-end system for managing all wildlife accidents in Sweden. The system serves about 7 600 user accounts.

In august 2011 we released the first App for Windows Phone 7. In October we released the same App for iPhone. And now we have also released an App for Android.

The App for iPhone has been downloaded about 6 000 times. The Web Service that provides accident location data has served over 800 000 requests since December 2011 (approx. 2 months).

93.31% mobile phone coverage

Now that the App is released for iPhone, Android and Windows Phone 7 we reach 93.31% of all Swedish mobile phones.
Source: StatCounter GlobalStats (Mobile OS, Sweden, January 2012). iOS (61.91%), Android (31.2%) and Windows Phone 7 (0.2%).

Download the app here

For the moment I’m working on a project with the Swedish Police, building an Adapter for an existing data application. The adapter that I’m developing communicates with a SOAP Web Service hosted on Apache. The data that is received is then transported back to the existing application. Quite the simple task, if it wasn’t for a very strange behavior in Microsoft .Net.

The SOAP Web Service requires authentication and if authentication fails it responds with a 401 error.

So I wrote this code and thought it should work.

image

As soon as we called a method in the Web Service, it responded with the 401 error. So I set the property PreAuthenticate to true.

image

That didn’t work either, so my first thought was that something must be wrong with the Web Service, or that I had been given the wrong credentials.

After a few hours of searching various forums I finally found the solution. Apparently the authentication is not added to the Http Header (as it should have been). So the solution was to subclass the Web Service class and implement some additions.

image

With this code in place, it’s now possible to add the authentication header to the Web Service.

image

image

Finally the call is authenticated and I received data from the Web Service.