Sep 07

When developing mobile applications using Compact Framework and storing data to the local device database it is very handy to be able to debug and test sql queries direct on the device. This post will walk you through how to connect to the device DB, look at the tables in the device DB and run SQL queries on the device DB.

Run your application from Visual Studio, your device or emulator must be connected and cradled. (I’m running on Vista so I am using Windows Mobile Device Center).

You need to install Microsoft SQL server (I’m using the 2005 version) and run the Microsoft SQL server management studio.

Create a new connection with the following attributes: Continue reading »

Tagged with:
Aug 12

I have now made the functional design for the RSWM project (my Windows Mobile pet project). The functional design is based on the user stories written earlier.

By creating functional design for your projects it is easier to get an idea about the final application and therefore help you make wise decisions at a early stage. I made this functional design by creating the different screens my application needs to fulfill the user stories. As a part of this I also made a screen flow map, showing the flow between the screens.

First I designed a main screen fulfilling user story 1.1 – 1.3

Main screen session started

Main not startedMain screen session not started Continue reading »

Tagged with:
Jul 09
Enable ClearType text

Enable ClearType screen on my HTC Touch Pro (text in Norwegian)

Choosing the right fonts for your mobile applications have a great influence on the application look & feel. All Windows Mobile  6 devices gives you the option to enable ClearType. On most devices it is disabled by default. ClearType is a technology developed by Microsoft that improves the readability of text on LCD screens. Quick and Easy explained it is smoothing the edges on the fonts. You can read more about ClearType at Microsoft Typography.

I will show you a quick tutorial on how to enable ClearType on your Windows Mobile 6 device:

  1. Open Start menu
  2. Click Settings
  3. Chose the System tab
  4. Click Screen
  5. Chose the ClearType tab
  6. Select Enable ClearType
  7. Click OK

Continue reading »

Tagged with:
Jul 07

Finally the summer has arrived and vacation time is closing in. During the summer and especially during my vacation I will spend as little time in front of the PC as possible, but I still want to be able to access the most important services. Luckily the amount of mobile applications have exploded the last years and you can find an application for almost everything these days. You also find a lot of creative not so useful but quite interesting applications. tweeted about one of these not so useful but fun applications earlier today:

IntoMobile: Mobile app tips you when to have a restroom break during movies

I will list the applications I have installed on my HTC Touch Pro that I will be using this summer as a desktop/laptop replacement. As you can see from the list below the most important for me this summer is to be able to check/send e-mails and to follow/participate in my social networks on the net.

PockeTwit (Windows Mobile app)

Continue reading »

Tagged with:
Jul 02

I have been involved developing a C#.Net Compact Framework project were we are using Model-View-Presenter(MVP) pattern for quite a while now and I would like to share my experiences learned during this project with you.

First of all, using MVP in a Compact Framework project is done exactly the same way as you would do it for standard C#.Net (or any other programming language). For some reason (unknown to me) developers tend to skip using patterns in mobility projects. I guess they think that good architecture is not necessary in smaller projects, like mobility projects often are. Wrong! As a developer you should strive to achieve good architecture in your projects no matter what size or complexity they have. What pattern to choose is of course another discussion. We chose to base the project architecture on the MVP-pattern and succeeded doing so. Let me walk you through how we ended up using it.

The figure below shows how the MVP components interact with each other. The View are implemented in the screens (forms) and the Presenter presents the data to be displayed to the View. The Presenter is responsible for the business logic and retrieve/save data to the Model. The Model will often interact with a Data Access layer (left out in this example for simplicity). The Model will also have business specific objects that both the Presenter and View can use, but the View will never ask the Model for data or save data to the Model.


Continue reading »

Tagged with:
Jun 20

pet-projectFor a while ago I asked on twitter and on my blog what the Windows Mobile application of your dreams are (earlier post asking about what kind of application I should develop). I did this to find inspiration on what kind of application I should develop when I’m now starting a new pet project. It’s always interesting listening to what kind of applications other people would like to have on their mobile devices.

I got several good suggestions but in the end I decided to take the first Windows Mobile application I made and develop it from scratch again. This was an application using the GPS on your device to track your movement and calculate current speed, average speed, distance covered, timer +++ The application were meant to be used when running to help you track progress and see all detailed information you often wonder about when you are done exercising.

I want to share my work with you on this project so as I start working on it I will write posts with code examples on how I do it. When this project is done, I will distribute it for free to you to enjoy:)

Why have a pet project?

Continue reading »

Tagged with:
Jun 17

mobilityWhen developing applications for mobile devices you often find the need to use a rapid application development (RAD) platform to achieve your goals and meet the time to market requirements for mobility projects. I have been developing mobile applications for several years now and I have seen many development platforms/frameworks. There are many reasons why you often need to take use of a platform/framework; wide device support, rich and flexible UI, secure and reliable communication, back-end integration and so on. If you were to take care of all these challenges by your selves the application development project would be expensive and time consuming. This post is written with large commercial enterprise applications in mind.

You should be very careful when selecting a platform for your project, by selecting the wrong platform your in for failure. The most important you need to do is to define your needs and make sure that the platform your are choosing fulfills those (or at least the most of them). Many companies/developers have different views on how to develop mobile applications, make sure that your chose a platform developed by a company that shares your view on this.

No matter what OS, programming language or technology you are using I think that flexibility is the key word. Do your self a favour, chose a flexible platform. By flexible I mean that even tough you are using a third party platform you must be able to chose when to use the platform functionalities and when to do custom coding. The platform should be easy to build functionality on top of (extending) and you should be able to switch between the platform API and the Standard API (Java ME, Compact Framework etc.).

I have been on both sides, I have been developing a RAD platform and I have been using third party platforms. I worked for over three years in the core development team at mBricks AS. mBricks is a RAD platform for developing Java ME applications (also supports Blackberry and Android). In my opinion mBricks is a great platform because of the flexibility it offers. If I were to develop a Java ME application there would be no doubt in my mind what platform to chose :)

Continue reading »

Tagged with:
May 11

I love playing with technology and I’m often developing applications just for fun and to explore possibilities. Since I’m in the mobile business I now want to develop an application for Windows Mobile devices. I have several ideas on what to make, but I want to know what the application of your dreams are. To find out I posted this tweet on Twitter:

What’s the Windows Mobile application of your dreams? I will pick the best suggestion, develop it and distribute it for free! #WinMo

This post will be updated with the replies I get from the twitter community and when I get enough suggestions I will as stated pick on of them to develop and distribute for free. I might also post some “behind the scenes” source code while doing so.

When I have found the perfect idea for an application I will write a post with details about the chosen application. Comments to this post will also be added to the suggestion list.

Continue reading »

Tagged with:
May 06

Yesterday Windows Mobile asked this question on Twitter (windowsmobile):

Question for developers: what are the top 5 questions you would have when investigating application development for mobile devices?

My response to this question were:

@windowsmobile device fragmentation, GUI possibilities, transport protocol, patterns & practices and application distribution

I don’t know if they were asking this on a technical view or on a business view, but since I’m a “tech head” I gave them my technical view on this question.

Continue reading »

Tagged with:
May 05

A few days ago I wanted to create a fresher UI then what .NET Compact Framework offers out of the box. I wanted to create a gradient background for the screen and I wanted to have transparent labels on top of the background. In my opinion this is not much to ask for and I was a bit surprised that I actually had to do this myself.

Well after a few hours I made a gradient background and a transparent label. I will now step by step go through my solution.

The first thing I started with was to create a gradient background. I found that the best way achieving this would be to override OnPaintBackground in the Screen class. I found a very good article on how to do this on MSDN: How to display a gradient fill. I copied the GradientFill class and the Win32Helper class into my project, I didn’t bother using the GradientFilledButton class since I only needed gradient for my background.

Then I override the OnPaintBackground in my Screen, giving me this Form:

using System.Drawing;
using System.Windows.Forms;

Continue reading »

Tagged with:
Subscribe to my feeds Follow me on Twitter