Issue
I m trying to get map inside AsyncTask getting mentioned error at this
in line mapFragment.getMapAsync(this);
inside a fragment
private class BackGroundTaskForUserProfile extends AsyncTask<String, Void, Void> {
getActivity().runOnUiThread(new Runnable() {
@Override
public void run() {
MapFragment mapFragment = (MapFragment) getActivity().getFragmentManager()
.findFragmentById(R.id.map);
mapFragment.getMapAsync(this);
Solution
mapFragment.getMapAsync(getContext());
Answered By - D.J
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.