0

I am using PlaceAutocompleteFragment and when i click on search field PlaceAutocompleteFragment dialog disappear then i get this error :

{"errors":[{"domain":"global","reason":"forbidden","message":"Requests from this Android client application com.ganger.package are blocked."}],"code":403}

by the way, when I install the application through the Android Studio this works perfectly so... what I have done for solve this

1.generated new API but it didn't work.

2.google place API is enabled.

4.meta data is in application tag in the manifest file.

5.Android Place Autocomplete Fragment closing on its own

6.Place Autocomplete not working properly Android 7.PlaceAutocompleteFragment disappears on click. After doing all these things still facing the same problem. Thanks in advance and really sorry for bad English...

Jaymin
  • 2,879
  • 3
  • 19
  • 35
Ganger
  • 91
  • 3
  • 10
  • You mean this error occurs when you tried to make an signed apk and try to search from there, Right? – Manish Karena Jun 06 '18 at 04:53
  • exactly @ManishKarena – Ganger Jun 06 '18 at 04:55
  • So may be it's the issue with your SHA certificate key, So please try to add the proper certificate-SHA key while creating API key from the Google API Console. – Manish Karena Jun 06 '18 at 04:57
  • when i created new api i double checked this SHA1 key is write.. – Ganger Jun 06 '18 at 05:00
  • @VVB i have not tried this..let me try and i will get you back in this comment section if face any problem..if you don't mind.. – Ganger Jun 06 '18 at 05:03
  • @Ganger Which SHA have you entered, i mean SHA with the debug certificate or SHA with the key-store that you use to creating signed application? – Manish Karena Jun 06 '18 at 05:05
  • 1
    well i got this SHA1 key going through gradle option right side upper corner of Android Studio then applicationname(root) then task then android and signing report there i got SHA1 key in logcat.. – Ganger Jun 06 '18 at 05:12
  • Have you tried to check the SHA1 of your key-store? If not then try to check out it and compare it with SHA1 you get from applicationname(root) folder. and if both are not the same then there is the issue. you can get the SHA1 from key-store by following the commands that described in the second section from this post : http://www.truiton.com/2015/04/obtaining-sha1-fingerprint-android-keystore/ – Manish Karena Jun 06 '18 at 05:35
  • i followed the step as mentioned in the link you refer..and got SHA1 key both are the same.. – Ganger Jun 06 '18 at 06:10
  • @VVB generated new web api and not worked..giving this error: Status{statusCode=ERROR, resolution=null} – Ganger Jun 06 '18 at 06:12
  • 1
    @Jaymin thanks for edit the question.. :) – Ganger Jun 06 '18 at 06:15
  • @Ganger You don't need web api key as you are working with the android app. – Manish Karena Jun 06 '18 at 06:16

1 Answers1

0

It seems like you are getting the error due to wrong SHA1 fingerptint because you have to add SHA1 based on your app's digital certificate.

In Your question you mentioned that the app is working fine when you run the app in debug-configuration(directly from the Android Studio). So i think it's working fine because you have entered the SHA1 for your debug-certificate. So you have to add the SHA1 for your release configuration as well to work with the API while you run the app in release-configuration(Signed apk with key-store).

You can get more idea about A debug certificate and A release certificate from here

Manish Karena
  • 724
  • 6
  • 29
  • really thanks for giving your valuable time..and the way you gave the answer is admirable. I released new SH1 key by following this https://stackoverflow.com/questions/34933380/sha1-key-for-debug-release-android-studio-mac .. and now its working fine.. – Ganger Jun 06 '18 at 07:46