Get Location Using FusedLocationProviderClient Api
Step 1: Add play services location in build.gradle compile 'com.google.android.gms:play-services-location:11.4.2' Step 2: Add Permission in AndroidManifestFile.xml < uses-permission android :name= "android.permission.ACCESS_FINE_LOCATION" /> < uses-permission android :name= "android.permission.ACCESS_COARSE_LOCATION" /> Step 3 : package org . pratap . userlocation ; import android.Manifest ; import android.content.Intent ; import android.content.pm.PackageManager ; import android.location.Location ; import android.net.Uri ; import android.os.Bundle ; import android.provider.Settings ; import android.support.annotation.NonNull ; import android.support.v4.app.ActivityCompat ; import android.support.v4.content.ContextCompat ; import android.support.v7.app.AppCompatActivity ; import android.view.View ; import android.widget.Button ; import android.widget.TextView ; import android.widget.Toast ; impo...