Building Android apps with the Nomad extension for Visual Studio 2010

UPDATE: Nomad has been retired by Red Gate and is no longer available for download. See their announcement here.

 

Last week I posted an article entitled Extending PhoneGap for Visual Studio to Android devices. In it I talked about how we can use the Visual Studio 2010 PhoneGap templates to create a Windows Phone 7 app and deploy it to an Android mobile device using the PhoneGap:Build service.

Well there is another piece of technology that I have been playing with lately that goes beyond PhoneGap:Build by baking the compilation service right into the Visual Studio IDE. The product is called Nomad and it is made by Red Gate Software in England. Right now it is in free private beta but anyone can request a copy of the product.

Much like the PhoneGap templates you will build apps using HTML5 and CSS. You can use the PhoneGap libraries to access items like the camera and accelerometer. You can even use things like jQuery Mobile. All of this will get compiled down to an application that can be deployed to a mobile device. You cannot as yet deploy a Nomad project to the Google Play store though. (See the comments below for an update.)

Right now Nomad only supports builds for Android and iOS. As with the PhoneGap templates you will need to have a membership with the iOS Developer Program before you can build an app for iOS. As well Nomad is limited to Visual Studio 2010 but not available for the Express editions as they do not allow extensions. Finally, Nomad only targets iOS 4.2 or later and Android 2.2 (Froyo) or later.

In the remainder of this post I will demonstrate how to use Nomad to build and deploy an app to an Android mobile device.

Once you send a request to Nomad you will get an email response with a download link. Download the Visual Studio extension and save it to your computer. Run the .visx file and follow the instructions to install the extension into Visual Studio. You may need to restart it if it was running during installation.

Nomad Extension Installer

With the extension now installed open Visual Studio and select File | New Project. Find the VS Nomad Project within the Installed Templates. Enter a Name and Location. Click OK.

Nomad New Project

Nomad will raise a message box on first use asking you to sign in with the account details from the email that contained your download link. Your user name is the email address you signed up with.

Nomad Sign In

Once you are in the solution you will see that Nomad provides a default project to begin with. The project contains an index.html file that contains some HTML and JavaScript, Hit F5 to view the project.

Nomad Project Default

You will see the default project is set up to use PhoneGap services like the compass and geolocation. However since we are running in the localhost we cannot access these items and thus the page shows an “n/a” beside these properties.

To start building your project you would want to clean out the index.html and start laying in your own code. However for this demonstration I want to use the provided demo code to show you how the PhoneGap tools in use on this page will actually work once compiled and placed on a mobile device.

To build your Nomad project find the Nomad build button on your toolbar. Click the drop down arrow beside the build button and select Build for Android. You can also select Build configured platforms if you want packages for both iOS and Android (provided you have the requisite iOS developer account).

Nomad Build Dropdown

After you select the Build button the code gets packaged up and sent to the Nomad cloud build service on Nomad’s servers. This means that you do not need additional SDKs or any other software to compile your app.

Once you click the Build button you will see a processing message.

Nomad Cloud Build Dialog Start

And once it is completed you should get a success message if everything compiles correctly.

Nomad Cloud Build Dialog Success

Clicking the Show in Windows Explorer button on the dialog box will take you to your project folder. The build process creates a “distrib” folder and your compiled app is placed in there. Since I built an Android app I received a .apk file back.

Once the item is saved to my computer I can then move the app to an Android mobile device for installation. To deploy the .apk file to my Samsung Galaxy Tab 2 10.1 Android tablet I will copy the file from my computer to my Dropbox folder. If you do not have one you can create a Dropbox account here. (Full disclosure: this is my referral link).

To install the app click your file on Dropbox to begin downloading it to the Download folder on your device. Once the .apk file is in your folder click it to begin the installation process.

Nomad Hello World App Install

Note: To install apps that do not come from a recognized Android marketplace you will need to make sure that you allow installation of non-Market applications. To do this go to Settings | Applications and click the Unknown Sources checkbox.

Samsung Tablet Settings

Once the app is installed you will see it in your list of Apps. Here is my Nomad Hello World app. You can see that once the device is loaded onto my tablet that the Compass, Connection, Device and Geolocation properties all present working data.

Nomad Hello World App Running

As you can see from this demonstration the Nomad extension for Visual Studio 2010 allows you to create a working Android application within a Microsoft environment. Although the Android app is only available for private use once they allow deploys to the Google Play store you are well on your way to creating Android apps within the Visual Studio 2010 IDE.

Leave a comment below and let me know what types of projects you would use the Nomad extension for.

Advertisements

About Ken Cenerelli
I am a Programmer Writer, .NET Developer, Microsoft MVP - Visual Studio and Development Technologies, Public Speaker, Blogger, and Microsoft Azure Nerd. I blog regularly at kencenerelli.wordpress.com and can be found on Twitter via @KenCenerelli.

4 Responses to Building Android apps with the Nomad extension for Visual Studio 2010

  1. As an update to my post I have received this message from VS Nomad: “Deployment to the Play Store should now work just fine, by the way – shout if you’re seeing otherwise!”

  2. I am building a logging application where the factory technician uses a tablet or phone to record meter readings and so forth. I followed your instructions and was able to side-load the apx to my phone with no problem. I was able to add a couple of form fields and they took data. Next steps: 1.) Get jquery to update a time form field with the current time that the reading is taken. 2.) attempt to post the form data to an endpoint.

  3. Nicholas – glad to hear you found the tutorial helpful and that you were able to extend the demo. Stay in touch and let us all know how it goes!

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: