How to get LatLng data from Google Geocoding API json?
<p>I am creating an application with map and faced with a problem.
I have a mapView in my Fragment and AutoCompleteTextView. When I pick any city from the AutoComplete, it should appear as a marker on the map.</p>

<p>Here is the code and it is working well on real Samsung Galaxy S3 and Galaxy S6 emulator, but not work on Meizu MX5. 
As I found, Geocoder does not work properly on every device, so there is a solution with Google Geocoding API. I got the Json answer, but don't know how to get LatLang and FeatureName from JSON.</p>

<p>Example of JSON: <a href="http://maps.google.com/maps/api/geocode/json?address=London&amp;sensor=true" rel="nofollow">http://maps.google.com/maps/api/geocode/json?address=London&amp;sensor=true</a></p>

<p>I am a new to Android, sorry if not everything clear.</p>

<pre><code>atvFrom.setOnItemClickListener(new AdapterView.OnItemClickListener() {

        @Override
        public void onItemClick(AdapterView&lt;?&gt; parent, View view, int position, long id) {
            locationFrom = atvFrom.getText().toString();
            List&lt;Address&gt; addressListFrom = null;
            Geocoder geocoder = new Geocoder(getActivity());

            try {
                if (markerFrom[0] != null) {markerFrom[0].remove();}
                addressListFrom = geocoder.getFromLocationName(locationFrom, 1);

                if (addressListFrom != null) {
                    Address addressFrom = addressListFrom.get(0);
                    latLngFrom[0] = new LatLng(addressFrom.getLatitude(), addressFrom.getLongitude());
                    tripFrom = addressListFrom.get(0).getFeatureName();

                    markerFrom[0] = googleMap.addMarker(new MarkerOptions().position(latLngFrom[0]).title("From"));
                    googleMap.animateCamera(CameraUpdateFactory.newLatLng(latLngFrom[0]));

                    if (markerTo[0]!=null) {
                        if (line[0] !=null) {line[0].remove();}
                        line[0] = googleMap.addPolyline(new PolylineOptions().add(latLngFrom[0], latLngTo[0]).width(5).color(Color.BLUE));
                    }

                } else {
                    MyGeocoder myGeocoder = new MyGeocoder(FragmentMap.this);
                    myGeocoder.execute(locationFrom);
                    try {
                        JSONObject jObj = new JSONObject(myGeocoder.jsonResult);
                        String Status = jObj.getString("status");
                        if (Status.equalsIgnoreCase("OK")) {
                            JSONArray Results = jObj.getJSONArray("results");
                            // how to get LatLng and FeatureName from json?
                            // dont know what to do here

                        }
                    } catch (JSONException e) {
                        e.printStackTrace();
                    }
                }

            } catch (IOException e) {
                //e.printStackTrace();
                Toast.makeText(getActivity(), "Error", Toast.LENGTH_SHORT).show();
            }
        }
    });
</code></pre>