Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9220115
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:16:23+00:00 2026-06-18T03:16:23+00:00

I am adding locations to my Android application which is utilizing the Google Places

  • 0

I am adding locations to my Android application which is utilizing the Google Places API and when I run a search for these places I am getting the Name, latitude and longitude back but I am unable to retrieve the formatted address or formatted phone number. I am wondering if it is not possible to add location details such as the address, phone number, website etc. or am I doing something wrong. Here is the HTTP post I am using:

public JSONObject addPlace(double lat, double lng, String type, String name) throws Exception {
    try {
        Log.v(LOG_KEY, "Adding Place...");
         String vic = "5/48 Pirrama Road, Pyrmont";
         String formtd_address = "5/48 Pirrama Road, Pyrmont NSW, Australia";
         String formtd_phone_number = "(02) 9374 4000";
         String myUrl = "http://maps.google.com/maps/place?cid=10281119596374313554";
         String myWebsite = "http://www.google.com.au/";

        HttpPost post = new HttpPost(PLACE_ADD_URL);
        String postBody = 
                    "{"+
                          "\"location\": {" +
                            "\"lat\": " + lat + "," +
                            "\"lng\": " + lng +
                           "}," + 
                           "\"accuracy\":50.0," +
                           "\"name\": \"" + name + "\"," +
                           "\"types\": [\"" + type + "\"]," +
                           "\"vicinity\":\""+ PlaceAdd.vic +"\","+
                           "\"formatted_address\":\""+ PlaceAdd.formtd_address +"\","+
                           "\"formatted_phone_number\":\""+ PlaceAdd.formtd_phone_number +"\","+
                           "\"url\":\""+ PlaceAdd.myUrl +"\","+
                           "\"website\":\""+ PlaceAdd.myWebsite +"\","+  
                           "\"language\": \"en\" " +

                      "}"; 

        StringEntity se = new StringEntity(postBody,HTTP.UTF_8);
        post.setEntity(se);
        ResponseHandler<String> responseHandler=new BasicResponseHandler();
        String responseBody = new DefaultHttpClient().execute(post, responseHandler);
        JSONObject response = new JSONObject(responseBody);
        Log.v(LOG_KEY, "Requested URL= " + PLACE_ADD_URL); 

        return response;

    } catch (HttpResponseException e) {
        Log.v(LOG_KEY, e.getResponse().parseAsString());
        throw e;
    }

    catch (IOException e) {
        // TODO: handle exception
        throw e;
    }
}  

So I guess I have two questions. Can you add place details when adding a location within your app to the Google Places API, if so is there something wrong with my code?

THANKS!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T03:16:25+00:00Added an answer on June 18, 2026 at 3:16 am

    As per the documentation, Place Reports only support location, accuracy, name, types and language parameters in the POST request. Please file a Places API – Feature Request if you think that it would be a useful feature to support adding place details.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am having difficulty getting my Monodroid application retrieve a location when I run
I have a sample application Android 2.1 google maps(2.1) application that I have. When
I am using mapquest for adding new locations with following code from Javascript API.
I'm porting android to Devkit8000 which is a BeagleBoard clone. I have a GPS
I am adding event like this... public static String EVENT_URI = content://com.android.calendar/events; public static
I have a table that is recording user locations from my web application by
I have an XML document of store locations which have a Type node indicating
I am working on android geolocation application in that I have added marker for
Recently, there's a new android SDK- ADT bundle for windows which includes everything but
I have a collection of locations on a google map object, stored in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.