aman
aman

Reputation: 11

how to create a place finder application

I am new to android and trying to develop one place finder application,gps is detecting my current location but how it can show the coffee shop in that area in listview

Upvotes: 1

Views: 564

Answers (1)

berni
berni

Reputation: 1975

First off all you need to need to have a list of locations (ex. coffe shops) with their GPS positions (latitude & longitude). You can put it into your app or access it through some API to always get a fresh list of locations.

When you have the list you can present it on MapView or as you prefer in ListView. As probably you would like to present them in distance from current position order you should calculate it with android.location.Location.distanceTo(Location dest). Find out more in Android documentation

To present data on ListView you will probably want to make a custom one. You can find a lot of tutorials on the web. One of them is here

If you provide more detailed question we will be able to give you more specific information.

Upvotes: 1

Related Questions