Search code examples
androidandroid-layoutroutesindoor-positioning-system

How to go about setting up routing for android application user interface?


App Background

I am attempting to create a small indoor position system for my university. I'm currently trying to figure out the best course of action to design a routing algorithm, and how that would work on the user interface.

For example, say the "user" is at a specific (x, y) point on the map, and I want to route them to another specific (x, y) point on the map.

My first thoughts on how to implement this is to use a GridView with maybe 30 x 50 blocks = 1500 locations. To represent a route I would set the background color to a specific block to blue. Then by chaining these blocks together it would represent the route to use.

Does this seem like a good solution? I am very new to android mobile application development.

Thanks


Solution

  • Pathfinding is a topic that well exceeds your question. To implement pathfinding in your case you would have to get your university's map not as a image but as data that the pathfinding algorithm understands.

    One of the most widely used pathfindng algorithms is A*, which is explained here, I think it would fit your project.

    To render the path in Android I would suggest using a Canvas which can be used to draw images (your map), lines (your path) and other graphical elements.