Blog Posts

Updates, Code Snippets, Demos, and a whole lot of random stuff

‘UnOxbow’ – A custom Algorithm I wrote to calculate Public Transit Routes

May 23, 2015 • 3 min read

Amdavad BRTS is one of the best Apps I’ve created for Windows Phone. It’s a companion App for Ahmedabad’s Janmarg users with features like Route Finder, Fare Calculator, Live Bus times, Station/Line details, and Weather. The App has more than 7,000 downloads, 170 reviews, and ratings averaging at 4.5 stars. Considering its target audience of just one city + the market share of Windows Phone, I think it’s doing really good.

In this post, I’m going to talk about a custom Algorithm I wrote to find Transit Routes for the ‘Route Finder’ feature of the App. I call it ‘UnOxbow’ (Yeah, I’m not very good at naming stuff). The problem was to compute the best possible Transit Route between 2 Stations while considering the criteria of Time, Distance, and Number of Transfers. To Tackle the problem, I created a round-based Algorithm which scans all Routes every round to find a route with or without transfers.

Starting with the Data I could get about the Mass public transit, Janmarg BRTS has 109 Routes and 144 Stations. Routes are a list of Station Ids where a Bus runs from the First station to the Last. The return journey of Bus from that Last station to First is again another Route. All Stations have an id, name, and geo-coordinates.

I pre-processed this Data by listing all Adjacent Junctions for every Station where a Transfer of Route is possible. Any Station on 2 or more Routes is considered as a Junction. All Junctions on the same route of a Station are their Adjacent Junctions.

Example Route Map

To discuss this Algorithm, consider the above Route Map. Buses run in the direction shown by the arrows in all 4 Routes while there are 20 stations distributed in 4 routes. We’ll try to find Route from Station S to all three Stations D.

Continue Reading…

CommentsAdd New

Meru Cabs for Windows Phone 8.1 is now available in Store

May 6, 2015 • 2 min read

Meru Cabs, an awesome new App that lets you book Cab Rides in 21 cities of India with One click, landed on Windows Phone Store today. I worked closely with the team at Meru Cabs for this App and I am very proud of what we’ve created.

The App has been completely re-written in WinRT and has lots of cool new features like One Tap cab booking, Cab & Ride Tracking, Meru Genie & Meru Eve booking, etc. Here are some screenshots of the App:

One Tap booking Schedule a Pickup

Continue Reading…

CommentsAdd New

Thanks Windows India!

March 14, 2015 • 1 min read

CommentsAdd New

Disabling Display timeout in Universal Windows App

March 14, 2015 • 2 min read

There are many scenarios in an App where you’d want the User’s device display to stay On; For showing directions, playing videos, presentations, reading, to name a few.

In Universal Windows Apps, this can be done with DisplayRequest:

using Windows.System.Display;

DisplayRequest displayRequest = new DisplayRequest();

This will make sure that the device’s display stays On even without any User interaction while the App presents relevant info on screen. The App can also enable Display timeout when it no longer needs the display to stay On.

To Re-enable the Display timeout simply make the following call:


Always re-enable the Display timeout when it’s not required. Also, keep in mind that the Display Requests are cumulative. For every Active requests, you will have to request Releases to enable Display timeout. You can enable and disable Display timeout any & as many times you want in the App.

I hope this Mini article helps you in your App development. Happy coding!

CommentsAdd New

Ludo for Windows 8.1

Ludo 2.0 for Windows

January 28, 2015 • 2 min read

Ludo was my first Windows 8 App uploaded to the Store in 2012. I created the game in Microsoft’s Windows 8 hackathon, and it was up in Store before Windows 8 RTM. It has been doing great with downloads and ratings without any updates with new features. Today, I’m changing that.

I’ve just released Ludo 2.0 to the Windows Store. The game has been re-written with lots of new features:

• All new ‘Sleek’ board theme
• Six colors for Player to choose from
• Create Bot to play against; Handy if you can’t find a 4th player
• Switch board themes with Swipe/Click
• Options to customize gameplay like chances to Roll 6, Extra Turns etc.

The Game is free with one In-App Purchase to get the Sleek theme. Download Now!

Download from Windows Store

CommentsAdd New

Older Posts, RSS Feed