Windows Phone App: Flight Status India

This is our 3rd public Windows Phone app (and 4th overall one) now available in the Marketplace. Flight Status India (FSI, in short) is a new, and as far as I know, the only app for seeing live flight status for airlines and airports in India. So if you (or someone close to you) is a frequent traveller, this is a must have app for you. You can find it here at the Marketplace.

FSI-01

When you start up FSI, you are presented with a screen from where you can start your query. You can query in two different ways:

By Flight Number: You can choose the flight operator code from the drop down and enter the flight number in the text box on the right.

By Airport City: You can select from any of the major cities in this option and get to see the live status of flights to or from here.

You can of course choose to see flights for the current day or one day previous or subsequent as well as the departure or arrival status of these flights.

FSI-02

When you select a flight operator by its code and then enter the number of the flight, you can search for that flight specifically. The airlines supported in this release are:

  • Jet Airways (9W)
  • Kingfisher (IT)
  • Indigo (6E)

There are many more airlines planned to be supported in the future. Once you’ve selected the status type and the date, simply click the large button at the bottom to retrieve the live status. You will need an Internet connection at this point to be able to get the live status from the online service.

FSI-02a

When the data is retrieved, you will be shown the details of that flight (if found) for that date as well as the current status. You can also see the scheduled and expected time of arrival or departure in this screen. In case you wish to refresh the data, the first icon on the application bar at the bottom lets you do that.

Some flights have multi-city hops. In case such a flight is retrieved, you will get multiple “pages” of information – one for each hop. You can browse the status for each hop by using the back and forward navigation icons at the bottom of the screen.

FSI-03

In case you had selected an airport city, you can optionally also enter a flight city as the origin or destination. If you do not enter this, you will be able to see a list of all flights arriving or departing the selected city. In this version, the following airport cities are supported:

  • Delhi
  • Mumbai
  • Bengaluru
  • Hyderabad

The same large button at the bottom will try and retrieve the live status from the Internet service.

FSI-03a

You will get to see a list of flights to or from the selected city – optionally filtered to the city you set as the origin or destination. You can scroll through this list and view the list of flights and their current status and expected time of arrival or departure. You can again refresh the screen with the button below.

The trial version of the app has the following limitations - You can only query Jet Airways (9W) or Delhi airport. The other airlines and cities are available only in the full version of the application.

As I mentioned above, we are planning on adding more airlines and cities in future versions. So do keep a lookout for them.


Tags: , ,
Categories: Development | Windows Phone | Download

2 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows Phone App: Delhi Metro

Our next Windows Phone 7.5 app is meant for travellers on the Delhi Metro. If you wish to know the fare between two stations and the route to take, where to change trains etc., then this app is for you. You can get it here or look for Delhi Metro in the MarketPlace and select the one by Enterprise InfoTech.

DM-01DM-02Once you start the app, it contacts the Delhi Metro server to get the latest list of the metro stations. Once loaded, you can tap and select the station from and station to in the main screen. As with other parts of Windows Phone, click on the alphabet to get a Jump List that allows you to jump to the station of your choice quickly.

 

DM-03Once the stations have been selected, click on the button to get the fare and route from the server again. This will initially show you the total fare and the route. The route markers are designated as follows:

DM-04> Green: Your starting station
> Yellow: Stations where you need to change trains
> Red: Your destination station

So in the screenshot on the left, you start from AIIMS, change trains at Rajiv Chowk, then again at Yamuna Bank and finally arrive at your stop – Akshardham. The cool part is that you can tap this list which will show you the expanded route – all the stations you pass through on the entire route are shown in Blue as on the right.

The app is available in both Trial and Paid mode. The only limitation in the Trial mode is that it doesn’t allow you to view the expanded route. Feel free to try it out and do send feedback on the MarketPlace or from the Help screen within the app itself.


Tags: , ,
Categories: Development | Download | Windows Phone

0 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows Phone App: EMI Amortization

An update on the blog after quite a while – and that too to announce a new Windows Phone 7.5 app I pushed to the MarketPlace! This is an personal finance utility app for calculating loan (mortgage) payments (called Equated Monthly Installments) or EMIs and the amortization schedule for it. The app can be used by both individuals or bank loan agents. You can either click here or search for “EMI Amortization” in your Windows Phone or Zune. This post details some of the things you can do with it.

When you start up the app you are presented with a Panorama with 4 screens to it:

EMI-01Screen 1 – Loan Details: You enter the details of the loan you are taking – the amount, rate of interest and the number of years and the mortgage EMI is calculated automatically and shown to you here.EMI-02

Screen 2 – Amortization Schedule: this shows you the full list of the amortization you pay up for the entire loan amount for each month. You can see the month, the balance remaining, and the interest and principal amounts you are paying each month. You can also click on any of the items in this list to see even more details about that month’s payment.

EMI-04Screen 3: Settings: This allows you to do a couple of different things. You can change the start date of the loan – this will change the dates shown in the amortization schedule. EMI-05You can also change the background image in the panorama by selecting a new image from your Pictures Hub or clicking a new photo. You can of course revert back to default from here too.

Screen 4: Send Details: This lets you quickly insert the important information regarding the loan and send it as an email or SMS. This is quite useful for loan agents who wish to calculate a loan for a potential client and then send them the information. Simply click the relevant buttons at the bottom, select or type in the email ID or phone number and send the details.

The app is available in both Trial and Paid mode. The Trial version has the following limitations:

  1. Your loan details are not saved when you exit the app and they are not loaded back when you return. You will need to enter the data again.
  2. You cannot send the loan details by email or SMS.

Feel free to try out the app and use the Help screen (available from the settings page) to send any feedback you might have.


Tags: , ,
Categories: Development | Windows Phone | Download

1 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows 8 Dev Stack–My take on it

With the BUILD conference just completed where Microsoft showed off a huge number of new features in it’s upcoming Windows 8 OS, the major questions revolving around the developer story was about the relationships between the different components to create apps for it. “Is .NET/SilverLight dead?”, “Do we create only HTML5/CSS/JS apps now” etc. were the ones that everyone had. However, while the conference cleared up a lot of things, it still kept the discussions going.

Here’s my take on the Windows 8 Developer Stack. This was created after a lot of discussion with very knowledgeable and bright people – my fellow RDs. Any omissions or errors are mine.

win8 Dev Stack

Let’s dissect this image for a better understanding.

First and foremost, there are now going to be two “types” of apps – the traditional Desktop apps – everything that you’ve seen and worked with in Windows till now, and the new “Metro” apps. The Metro apps run on the new touch screen paradigm and use a whole new stack for development.

The traditional stack remains more or less the same – you can create native Windows (forms) apps with C++ and Win32. Or you can use .NET (now in a new 4.5 flavor) with WinForms or XAML as front-end and C#/VB/C++ as the language. For better compatibility with future versions of Windows, it seems sticking to the XAML path would be more beneficial.

The new “Metro style” apps is where all the enhanced stuff sits. You can create Metro apps using a combination of HTML5/CSS + JavaScript OR XAML + C#/VB/C++. Note that the XAML used for Metro (which I term as M-XAML above), while syntactically identical to the Desktop XAML, has other enhancements and changes tailored for Metro specifically.

The other main change is that the C#/VB/C++ code runs not on ".NET per se, but again a syntactically identical, but Metro enhanced runtime called WinRT. This is a new base API that does not replace Win32 API completely (as yet) but provides services (in the form of services and APIs) that can be used by Metro style apps. WinRT can still call and use subsets of .NET and Win32 as and when needed. I assume that in the future .NET will embed completely into WinRT and Win32 will be replaced by this new stack.

What does this mean for developers? Well, if you are on .NET today, you can simply start learning the new WinRT using the M-XAML/C#/VB route and start creating Metro apps. If you are a HTML/CSS/JS developer, ramp up on HTML5/CSS3 and the JavaScript extensions and frameworks available as well as the WinRT code. If you want to build an application that would run both on Windows 7 and Windows 8 you can create it with XAML and then for Windows 8 also provide a M-XAML frontend. We will of course need to see how all of this comes together as we start getting more information out of Microsoft.

Windows 8 looks really nice and brings in a new way of interacting with your apps and devices Make sure you get on board right now.


Tags: , , ,
Categories: Development | Windows 8

30 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows Phone 7–India Readiness Workshops

With the Windows Phone 7 launch just completing in the US and most of the world, including Europe and parts of Asia getting ready to receive the WP7 handsets this or the next month, it’s only natural that lots of us in India are also waiting for them.

Unfortunately, there is going to be a delay before the handsets are available to purchase in India. This is expected to happen hopefully in the first quarter of 2011. Till then you will need to just read the rave reviews for the phone all over.

But here’s the good news. I’ve been working with the WP7 team here in India and Microsoft India has graciously offered to lend handsets for testing existing applications developed locally during a workshop. We are planning to conduct 1 or more workshops in cities in India for WP7 application development and testing.

The workshop will be for 2 days consisting of a few development sessions and hands on where you can test apps you have developed on real handsets rather than the emulator.You can work with us to figure out issues in your apps and optimize them for submission to the Marketplace. Not only that every participant will also get a bunch of goodies – one of which I can’t describe here but is potentially a great gift for getting visibility for your app.

If you are an individual or part of a company developing an app for Windows Phone 7, please contact me with the following details via email (through the Contact me link above) or via twitter (@vinodunny). Please do note that we are looking for apps that are well into development and for submission into the Marketplace and are not demos or samples that you’ve built for learning WP7 development. You can of course submit more than one app.

These are the details I’ll need:

Your Name:
Company Name:
WP7 Application Name:
Application Description:
State of Readiness:
City:
Contact Info (email, phone, twitter, etc.):

We’ll be collating this information and sending out invites for workshops that we conduct in your city. Please note that the seats are limited in each city (which are still in planning stage), so please do reply to me quickly.

Looking forward to seeing you at the workshop soon.


Tags: ,
Categories: Development | Gadgets | Windows Phone

17 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Application Page Ribbon & Dialogs on SharePoint 2010

One of the cool new features in SharePoint 2010 is the availability of the Office Ribbon. Using the simple XML syntax, it is quite easy to add your own Ribbon controls and tabs to existing lists, libraries, and even your own web parts. You can even add contextual ribbon tabs to web parts hosted in your own custom Application Pages.

Now it’s easy to get a “global” Ribbon by simply omitting the RegistrationId and RegistrationType attributes in the Elements.xml file. You’ll find ways of doing this in tons of blog posts all over. What is not so obvious, however, is the way to do add a Ribbon to a particular Application Page when the page does not host any Web part or user control. So here’s some help for you. I’ll also take a look at interacting with a modal dialog using the new framework in SharePoint from this ribbon.

More...


Tags: , , ,
Categories: Development | Office | SharePoint

18 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Exchange Web Services & Sending Inline Images on Exchange 2007 SP1

Microsoft recently released the Exchange Web Services Managed API SDK 1.0. This mouthful which I’ll just call EWSMAS is useful for writing custom applications that work with Exchange Server (2007 SP1 or 2010). In one of the projects we are currently working on, we need to send emails over Exchange with both normal attachments as well as inline in the mail body.

Now here’s the good thing – if you’re already on Exchange 2010, there is a simple property called IsInline that will allow you to specify the attachment as inline. However, if you’re on Exchange 2007 SP1 still (like in the case of Exchange Online/BPOS), you’re stuck as the property returns an exception stating it’s only for Exchange 2010. Here’s how to solve this problem. Note that I’ve created a simple console app to demonstrate this method only. I assume you know how to download the SDK and add reference to it in VS2008/2010.

   1:  ExchangeService service = 
   2:       new ExchangeService(ExchangeVersion.Exchange2007_SP1);
   3:   
   4:  // Use when machine is IN Domain
   5:  //service.UseDefaultCredentials = true;
   6:  //service.AutodiscoverUrl("user@domain.com");
   7:   
   8:  // Use when machine is NOT in Domain
   9:  service.Credentials = new WebCredentials("user@domain.com", "password");
  10:  service.Url = new Uri("https://Your-CAS-Server/EWS/Exchange.asmx");
  11:   
  12:  // Create an e-mail message and identify the Exchange service.
  13:  EmailMessage message = new EmailMessage(service);
  14:   
  15:  // Add properties to the e-mail message.
  16:  message.Subject = "Testing from .NET Client";
  17:   
  18:  // Add the image as inline attachment
  19:  FileAttachment attachment = 
  20:       message.Attachments.AddFileAttachment("C:\\temp\\attach.png");
  21:  attachment.ContentId = "01"; // this should be unique - say a GUID
  22:   
  23:  // Add the message body which refers to this contentID
  24:  message.Body = "Sent from a .NET with inline image <img src='cid:01'>";
  25:  message.Body.BodyType = BodyType.HTML;
  26:   
  27:  // Add recipeint
  28:  message.ToRecipients.Add("anotheruser@domain.com");
  29:   
  30:  // Send the e-mail message and save a copy.
  31:  message.SendAndSaveCopy();

Notes:

  1. Lines 5-6 should be used when the machine sending the mail is in the same AD domain as the Exchange server (say, an in-house Exchange server)
  2. Lines 9-10 should be used when the machine sending the mail is in a different AD domain from the Exchange server (say, hosted Exchange or BPOS)
  3. Line 21 is the one that sets a ContentId property for the image attachment – this will now NOT show the image as an attachment anymore. In case you need to simply add it again – this time without the ContentId.
  4. Line 24 uses this ContentId with the cid: property in a standard HTML image tag. This is what makes the image show up inline in the right place.

Inline 
This is what the inline image looks like once it is sent and received.


Tags: , ,
Categories: Development | Microsoft | Exchange

4 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

TechEd India 2010: PPTs, Demos & Code Snippets

I had two sessions at TechEd India 2010 – one on a lap around VS2010 Web and Cloud Development and the other on Lighting up Apps on Windows 7 using the Windows API Code Pack. The entire set of demos and content is given below. Please read to see how to use them.

The entire set is available on this SkyDrive folder. You can download the PPTs and demos for the ones you want. To create the demos yourself, you will also need to download the “Snippets” file and unzip it somewhere. Load these snippets into VS2010 using the Snippet Manager.

Open any of the projects and go through each “page” of code. You will see comments by me where you need to add some snippet. Simply type in the snippet and press tab twice to insert the appropriate code.


Tags: , , ,
Categories: ASP.NET | Development | Microsoft | Windows 7

1 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Windows Phone 7 – My first app

As I unfortunately could not be at Mix 10 this year, I had to be content watching the Keynote from their live stream (which BTW worked flawlessly). Scott Guthrie as usual was outstanding and fun. And while showing off the new Windows Phone 7 developer tools went ahead and created a simple Twitter app on stage in about 5 minutes.

Well, I went ahead and downloaded the tools and installed them. Since I already had VS 2010 RC on my machine, it didn’t need to download the Express edition. It did install a bunch of other things and finally once done I went ahead and started it up.

So here’s how I beat ScottGu at his own game. I build a simple Twitter app for the Windows Phone 7 in even lesser time than him.

I created a Windows Phone application from the new project templates provided.WP7-01

Next, I changed some text around for the page and title. I also dropped in a TextBox, Button and a WebBrower control into the ContentGrid area on the phone.

WP7-02

WP7-03 I then simply added an event handler for the button’s click, like so:

webBrowser1.Navigate(new Uri("http://twitter.com/" + textBox1.Text));

That’s it. I then simply ran the application which started up the Windows Phone 7 emulator and deployed the application within it. Here’s what it looks like running.

The emulator doesn’t really have too many things in it other than Internet Explorer and some settings pages. You can of course go ahead and use the emulator to test out apps you create with Visual Studio 2010 or XNA Studio 4.0.

Here to creating great apps on Windows Phone 7. Have fun!


Tags: , ,
Categories: Development | Gadgets | Microsoft | Rave | SilverLight | Windows Phone

15 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed

Convert/Display PDF & Word Files as Images in .NET

Recently I had to write some code as a sample to be able to display Word and Acrobat files on a Web page in a 2-page view. We couldn’t simply use a plugin or application on the user’s machine to do so. The solution was to export each page out to an image and then display the pages in any way we needed. We therefore needed to do some document export code from our application.

Word to Images

Converting Word files (.DOC & .DOCX) to images was fairly simple, although I do think I probably took a longer approach. The problem is that the older DOC format and the newer DOCX format have different APIs to work with. So instead of doing this, I simply exported them both to XPS and then used the XPS API to retrieve images for each page. This last part was not obvious to me till I found the one line of code required to do this on a forum – I apologize for not linking to this as I can’t find that link anymore. The credit for that part is wholly the original author’s.

PDF to Images

Converting PDF to images was a major issue. There is no direct way of doing this. There are many 3rd party components that are available to do this, but most of them cost a bomb. Some free ones like PDFSharp are able to iterate pages but there is no way to export a complete page to an image without walking through the entire structure of the page and redrawing everything.

This is where I found the GFLAX library. This requires GhostScript for Windows to be installed on the machine as well. You can register the DLL and then reference it in your .NET code.

Code Sample

I’m attaching the entire code sample to this post as a download. The code is released with the open source BSD license. All external components (Word and Office interop assemblies, GFL, etc.) have the copyright of their owners and must be adhered to.

Usage

Once you download the attachment and extract it, open it in Visual Studio 2008. Make sure you’ve installed GhostScript from the link above and run a “regsvr32 GFLAX.dll” for the GFLAX Library. Add reference to Microsoft.Office.Interop.Word on your machine (and remove the marked lines from Web.config) from the .NET tab and to GFLAX from the COM tab.

Run the application and upload .doc, .docx and .pdf files and you can then view them in the browser directly.

WordDisplay 
Two page display of an uploaded Word file. Works with PDF files too.

Download:
Tags: , , ,
Categories: ASP.NET | Development | Office | Tips | Download

7 Comments
Actions: E-mail | Permalink | Comment RSSRSS comment feed