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 6787261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:20:42+00:00 2026-05-26T17:20:42+00:00

I am working on an application which uses google places API. I got API

  • 0

I am working on an application which uses google places API.

I got API key for my application,but the problem is I am getting ZERO_RESULTS as a response from the sever.

Here is my code I used DefaultHttpClient to establish the http connection. Can anyone tell me what is the problem?
Please help I am stuck here.

public class Splash extends Activity{
     private  String keystring="";
     //This is my request url 
    String requesturl="https://maps.googleapis.com/maps/api/place/search/json?" + 
      "location=17.739290150000002,83.3071201&radius=6000&" +
      "types=hospital&sensor=false&key=";
     private static byte[] key; 
     String signaturegot;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        // TODO Auto-generated method stub
        super.onCreate(savedInstanceState);
          /*
            Here I am using default http client to establish 
            the connection for the request url
           */
           
            HttpClient client=new DefaultHttpClient();
            StringBuilder builder=new StringBuilder(requesturl);
            builder.append(URLEncoder.encode(keystring));
            HttpPost post=new HttpPost(requesturl);
            try {
                HttpResponse response=client.execute(post);
                HttpEntity entity=response.getEntity();
                if (entity != null) {
                    InputStream is = entity.getContent();
                    String val = StaticUtils.convertStreamToString(is);
                Log.e("",val);
                }
            } catch (ClientProtocolException e) {   
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
    }



Here is the response from the server
{
   "html_attributions" : [],
   "results" : [],
   "status" : "ZERO_RESULTS"
}
  • 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-05-26T17:20:43+00:00Added an answer on May 26, 2026 at 5:20 pm

    Due to some weird reason, for locations in India, instead of using types use names

    https://maps.googleapis.com/maps/api/place/search/xml?&location=17.739290150000002,83.3071201&radius=6000&names=hospital&sensor=true&key=yourkeyhere

    For the phone number, you have to request details using the reference string that you got from the above URL :

    https://maps.googleapis.com/maps/api/place/details/json?&reference=usethereferencestringfromtheaboveurl&sensor=true&key=yourkeyhere

    The output will contain:

    "formatted_phone_number" : "0891 123 0101",
          "geometry" : {
             "location" : {
                "lat" : 17.7060120,
                "lng" : 83.3104410
             }
          },
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a very graphic-heavy application which uses content from a bunch of
Simple problem. I'm working on a Delphi 2007/WIN32 application which now uses MS Access
I'm working on an application which uses data from db which has to be
I'm working on a .Net application which uses Asp.net 3.5 and Lucene.Net I am
I'm working on an asp.net application which uses Lucene.net I need to highlight the
I'm working on a web based application which uses a JSON over HTTP based
I am currently working on a sample application which uses QNetworkAccessManager to send the
I'm working on an ASP .NET 2.0 site which uses a Web Application project
I am working on an application which starts as a service but only if
I'm working on an application which has data imported from a foreign (and wholly

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.