ITM 707 Lecture 5: Lab06-Working with Location
Document Summary
Lab 06: working with location (displaying location information) Objectives: setting up the environment for location detection, extract location information and show in app (help docu(cid:373)e(cid:374)t: lecture (cid:374)ote (cid:862)worki(cid:374)g (cid:449)ith de(cid:448)ice locatio(cid:374)(cid:863, start a new project (mylocationxxxx) with empty activity. Add five textviews (latitude, longitude, speed, altitude, address). Xxx is the last 4 digits of your student id: make mainactivity class implements locationlistener. (if red light bulb warning asks to implement methods, right click on the bulb and implement methods). Inside the class, add locationmanager variable locationmanager, string variable provider, and textview reference variables for all 5 onscreen textviews. Create a location variable location use findviewbyid method to initiate all five reference variables with the onscreen textviews set locationmanager = cast to locationmanager getsystemservice (context. location_service) ; May need to add permission through red bulb or set two location permissions in the.