How to retrieve current device location & show it on map fragment in a fragment
I'm developing a android app with google maps. Currently I'm able to view the map inside my app, but I don't know how to view the current location on the app. Here is my code: public class MapsFragment extends Fragment{ MapView m; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // inflat and return the layout View v = inflater.inflate(R.layout.map_near_me, container, false); m = (MapView) v.findViewById(R.id.map); m.onCreate(savedInstanceState); return v; } } Edited: And the xml: <LinearLayout xmlns:android="http://schemas.android