Uncategorized

Mobile development is too Expen$ive

mobile-dev-expensiveI have been a bit overwhelmed the last year and have not made the time needed to contribute to this poor excuse for a blog. Lately I have starting embracing iOS again. This is primarily due to the fact that I have been working with a team to develop a large-scale iOS app.

This app is highly customized, in that it diverges from the boilerplate designs and controls found in the native iOS toolbox. The result in a beautiful and elegant iPhone app with a phenomenal user experience. For this app we will continue to use Xcode and Objective-C, however, along the way I have researched several alternatives in an effort to find ways to speed up the mobile dev process. The fact are that mobile deve can be a major time suck and the process is VERY expensive. I am now on a mission to find better and less expensive methods to deliver mobile apps that still offer the same high quality that uses demand.

At this point I have focused on Xamarin and Titanium/Alloy. I would love to use Xamarin because it is C# but “today” Xamarin does not offer a full cross platform path. You still need to understand the iOS and Android frameworks to build an app that supportes each. Alloy on the other hand does support a cross platform UI with a single code base. My plan is to create a small app with Alloy and see if I can deliver the same experience that I could with platform specific tools.

Standard
Uncategorized

Changing console output color


Recently I have been learning git and have was intrigued with their use of color in the console output. (You also experience this when you run msbuild). Anyway it turns out this is actually really easy to do in your own console applications. Here is the code that produces the output you see in the image.

static void Main(string[] args)
{
    Console.ForegroundColor = ConsoleColor.Red;
    Console.WriteLine("Red");
    Console.ForegroundColor = ConsoleColor.Yellow;
    Console.WriteLine("Yellow");
    Console.ForegroundColor = ConsoleColor.Green;
    Console.WriteLine("Green");
    Console.ResetColor();
    Console.WriteLine("Normal");
    Console.ReadLine();
}
Standard
Uncategorized

Problem with ApplicationBar Opacity

opacity-issue1 In v1 there is an issue with list box behind an ApplicationBar if you set the opacity of the app bar to anything but 1. Try to scroll through the list and you will find that you cannot scroll the last item completely into focus. A quick fix is to set the opacity back to 1. However, that was not good enough for me. You can resolve the issue by adding an extra element to the end of the list to buffer up the list.

opacity-issue2

Add a ListItem that forces some padding

<Canvas Height="75"/>

Standard
Uncategorized

Web Development for Windows Phone

Windows Phone makes application development easy. However some times easy is not easy enough. If you have an existing web app and you just need to add a mobile interface a mobile web app may be all you need.In most cases you new mobile site just needs to be very basic pages that are designed to look good on a smaller screen. In addition to this you will want to add the “viewport” meta tag to keep the screen from sizing and resizing. Just add this in your head section of your html and the mobile browser will do the rest.

<meta name="viewport" content="width=320,user-scalable=no" />

Microsoft has put together some resources to help you along:

Standard
Examples

Using the Accelerometer

One thing that is fun to play with on a mobile phone is the accelerometer. Apps that are controlled by orientation are fun and generally do well in the Marketplace.

In this post you will set up a quick and dirty app that uses the raw accelerometer data.

  1. Create a new project in Visual Studio
  2. Add a reference to “Microsoft.Devices.Sensors”
  3. Add the using directive “using Microsoft.Devices.Sensors;”
  4. Create a Page scoped Accelerometer object “_sensor = new Accelerometer();”
  5. Add an event handler for the “ReadingChanged” event. “_sensor.ReadingChanged += OnSensorReadingChanged;”
  6. Start the Accelerometer. “_sensor.Start();”
  7. Respond to Accelerometer feedback in the “ReadingChanged” event. If you are updating UI you will need to handle those updates on the UI thread using Begin Invoke. “Deployment.Current.Dispatcher.BeginInvoke(() => { … });”
Standard