Here’s something you may not know: Did you realize that mobile web apps and native apps are nearly equal in terms of capabilities? It’s true. As you learned in this article from a few weeks back, mobile web apps are much more powerful than most people think.
As promised in that article, I’m going to go through some of those “native” features and explain how to use them in your mobile web apps. Today, let’s take a closer look at the first feature on the list: GPS. Specifically, I’m going to show you how to use GPS in your mobile web apps, and also give you a few ideas on ways to use it.
How to use GPS
Using GPS in mobile web apps is actually quite simple thanks to HTML5’s geolocation API. Without getting too technical, here’s what it does: Geolocation lets your mobile web application use the device’s GPS to pin-point the user’s longitude and latitude coordinates. How can you use geolocation? We’ve written up a full tutorial complete with a demo, which you can find right here.
A few ideas
Now that you know how to use GPS in your mobile web apps, let’s tackle another big question: What exactly can you build? The possibilities go far beyond simply getting the user’s location. For instance, here are a few types of mobile web apps you can build when you take advantage of GPS:
- Trip meter apps that can calculate distance traveled
- Check-in apps that let users check in to specific locations
- Discovery apps that let users find things nearby
- Tracking apps that let customers see their shipment’s progress
- Turn-by-turn navigation apps (if used with the accelerometer)
Many people assume that taking the mobile web app route means they must sacrifice features. The fact is, mobile web apps are far more powerful than most people think. Today, we learned how to use GPS with mobile web apps, but this is only the tip of the iceberg. Over the next few months, I plan on covering even more “native” features that you can use with mobile web apps. Stay tuned…