Rohit
Rohit

Reputation: 3408

Google places shows blank

I want to use google places api but this is now working shows me Request_denied in android app and also in browser . please help

following this tutorial for google places http://www.androidhive.info/2012/08/android-working-with-google-places-and-maps-tutorial/

{
"debug_info" : [],
"html_attributions" : [],
"results" : [],
"status" : "REQUEST_DENIED"
}

i have generated key as following

enter image description here

and overview is this

enter image description here

and using this for testing

https://maps.googleapis.com/maps/api/place/search/json?location=-33.8670522,151.1957362&radius=5000&types=food&name=harbour&sensor=false&key=AIzaSyBLW2RsxQuoZme-oy2t6ebRI7qyaOtMJq0

EDIT :

enter image description here

my permissions

<permission
    android:name="com.antheminfotech.locationnearby.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>

<uses-permission android:name="com.antheminfotech.locationnearby.permission.MAPS_RECEIVE"/>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>    

enter image description here

Upvotes: 1

Views: 1527

Answers (1)

Aravin
Aravin

Reputation: 4108

Create a new project in google api provide the details like name and you package name and your sha1 key then click android in that. After that it show new key there you find generate new keys(browser,server,android) you can create the keys for both browser and android.

First enable the following services in google Api console

1.Google Maps API v2

2.Places API

3.Analytics API

<uses-permission android:name="(YourPackageName).permission.MAPS_RECEIVE"/>

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>

add this also

    <uses-feature
    android:glEsVersion="0x00020000"
    android:required="true"/>  

Any problem to this let me know.

Upvotes: 1

Related Questions