Skip to content
sibi edited this page Nov 21, 2016 · 3 revisions

LAB ASSIGNMENT #6

Question:

Create a signup page with Basic details like First name, Last name, Image, Address etc.

Answer:

Created Sign-Up page by myself and referring to some samples in Internet.

Sign-Up page filled with User details

Question:

Image should be populated by using Camera or Gallery.

Answer:

Image was populated in ImageView tag in Sign-Up page layout.

Using Camera:

Used Intent command "ACTION_IMAGE_CAPTURE" and Created onActivityResult method to display the captured image in ImageView tag in the layout.

Image was captured using Camera actions

Captured Image shown in Sign-Up page

Using Gallery:

Used Intent command "ACTION_PICK" to select the Image from Gallery.onActivityResult method was used to display the selected image in ImageView tag int he layout

Image was selected from Gallery

Selected Image was displayed in Sign-Up page

Question:

Address should be populated using Location Manager.

Answer:

Address was populated in EditText tag in Sign-Up page.

  • Latitude and Longitude of current location was retrieved by using Android Location Manager
  • Address of the above Latitude and Longitude was retrieved by using Google Maps API

Coordinates of the current location are being retrieved which is shown as Toast message

Address was filled Automatically

Question:

After Signup, show an Activity named “Home” which has a Map with Custom Marker (Use the image from Signup form) at current location.

Answer:

Home Activity was created which displays the Map with custom marker (i.e: Image from the Sign-Up page) The image from the Sign-Up page was used as marker in Maps using "Intent". Functions used:

  • getParcelableExtra()
  • putExtra()

Clone this wiki locally