How to create a simple Google Map app in Android

This video is created as part of my school assignment on the new things i learned during my open project. I had fun playing with ADT (Android Development Tools) specifically when working with the Google Map, so i decided to take that as the topic. I tried to aim for a 10 mins video but overshoot by almost three times the duration. Nevertheless, i believe that you, the viewer, after such considerably long lesson will still have much question when trying the hands on yourself

For more detail about the things i mentioned in this video, you can get a good reference from http://developer.android.com or just leave your question on the comment section.


=== Links & Info ===

[1] The source code of the project (MyApp_Basic_Project_Apr2.zip):
https://drive.google.com/folderview?id=0B9_x6SgCuoPMbDNOMFFRZnkzRTQ&usp=sharing

[2] To get address from when user tap anywhere in the map.
First, from the video we know app OnMapClick will be called with lat&long info. second, we need a way to translate this lat&lng into address.. this process called Reverse Geocoding, and one service you can use for this purpose is the Google Maps Web Service.
Basically your app need to send translation request with GET method over http to google server and it will return you with the xml/json (whichever you prefer) document containing the info. For example the Google Headquarter located in this coordinate (37.423182,-122.083367), send this URI string over http (for testing you can just try to copy paste to your browser and see response):
http://maps.googleapis.com/maps/api/geocode/xml?latlng=37.423182,-122.083367&sensor=false

Next you need to parse that response and show it to user. For more info about Google Maps Web service can be seen here
https://developers.google.com/maps/documentation/webservices/

[3] Showing POI (places of interest) around the place where user tap.
It basically about the same with reference [2], but instead finding a Address Translation web service you might want to search for web service that provice the places list. One you can use is Google Places API, which require you to have additional key for access. For more information about Google Places API you can go here
https://developers.google.com/places/documentation/

[4] Running Google map app in emulator. By right Android emulator won't support running app which require Google Play Service library to run (e.g. the MyApp in this video for example). There is a workaround though, a friend of mine said she successfully run Google Map app by following this steps in internet:
http://stackoverflow.com/a/14562396

I never really try though, since i pretty much prefer running any app directly on the phone to get the feel of user experience

[5] connection to Android device. Use the usb cable that comes with your device. In my case i didn't need to do any specific setup, but if you still not able to connect I found this site provde good insight on things to check out
http://visualgdb.com/tutorials/android/usbdebug/

[6] "keytool" command not recognized. It's because you haven't added the keytool location to the system path. First search for keytool.exe under your Java folder (by default it's under your C:\program files\Java). After you get the location info, add it to system path. See more from here:
http://stackoverflow.com/a/10152964"

  • Aucune note. Soyez le premier à attribuer une note !

Ajouter un commentaire

 

7 choses à savoir si Tu débutes en automatisme...

7 choses que tu dois savoir si tu debutes en automatismeCliquez ici pour télécharger le guide PDF

Superv 3