How to get current location in Android Google Map (FusedLocationProviderApi)

In this tutorial , we will learn how to make a Google Maps App that shows your current location. Best to use the FusedLocationProviderApi now, as it offers less battery drain than the old open source LocationManager API. Also, if you’re already using Google Play Services for Google Maps, there’s no reason not to use it. I have added sample code in Github, you can download the code from here (Download Code).

YouTube Video:

 

NOTEYou have to provide your own API_KEY in google_maps_api.xml, otherwise location will not display in your application.

Creating new Android Project:

1) Open Android Studio and make a new project with name “Current Location”  and company domain app.test.currentlocation.saidur.me.currentlocation;

2) Click Next and choose android version Lollipop. Again Click Next and Choose Google Maps Activity.

3) Leave all things remaining same and Click Finish.

Now you will be able to see three files:

  • google_maps_api.xml (…/GoogleMapsApp/app/src/debug/res/values/google_maps_api.xml)
  • MapsActivity.java (…/GoogleMapsApp/app/src/main/java/com/androidtutorialpoint/googlemapsapp/MapsActivity.java)
  • AndroidManifest.xml ( …/GoogleMapsApp/app/src/main/AndroidManifest.xml)
Read More
 

Android Tutorial for Beginners [Part-1] Introduction – Android Platform

Hello, this is Saidur Rahman. Welcome to the Android Tutorial for Beginners from saidur.me. Throughout this series of tutorial we will learn details regarding Android development from Basic to Advanced level though the name of the tutorial series is Android tutorial for Beginners. I will try to share my knowledge regarding Android application development, Google play store and Android Studio.

What is Android?
Android is an open source and Linux-based operating system for mobile devices such as smartphones and tablet computers. This tutorial will teach you basic Android programming and will also take you through some advance concepts related to Android application development. Android programming is based on Java programming language so if you have basic understanding on Java programming then it will be a fun to learn Android application development.

Read More