Get Location from withIn the Android app

Google geo location icon

How to get location from android app using the simple codes ? Create a new java class in project names LocationHelper.java 2. Add the dependency in gradles file implementation ‘com.google.android.gms:play-services-location:17.0.0’ implementation ‘com.google.android.gms:play-services-location:9.4.0’ 3. Now in the MainActivity <Button android:layout_width=”wrap_content” android:layout_height=”wrap_content” android:layout_centerInParent=”true” android:onClick=”GetLoc” android:text=”get Loc”/> On buttonclick call the below method to ask for the permission … Read more