googleads / googleads-consent-sdk-android

Consent SDK
https://developers.google.com/admob/android/eu-consent
Apache License 2.0
100 stars 82 forks source link

Unable to resolve host "adservice.google.com" error #104

Closed mbpictures closed 4 years ago

mbpictures commented 4 years ago

Hi!

I added the example code from the docs to the onCreate Method in Java and the "onFailedToUpdateConsentInfo" listener gets called with an "Unable to resolve host "adservice.google.com" " error. Do you have an idea how to solve this? I've added the INTERNET and READ_NETWORK_STATE permission. I'm using version 1.0.6.

Best regards!

rareserban commented 4 years ago

Untill more information is provided, can you please tell if you have ads implemented as well?

On Thu, Feb 13, 2020, 22:56 Marius notifications@github.com wrote:

Hi!

I added the example code from the docs to the onCreate Method in Java and the "onFailedToUpdateConsentInfo" listener gets called with an "Unable to resolve host "adservice.google.com" " error. Do you have an idea how to solve this? I've added the INTERNET and READ_NETWORK_STATE permission. I'm using version 1.0.6.

Best regards!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-consent-sdk-android/issues/104?email_source=notifications&email_token=AH24TPQUKDMQAHRWTGF5NRDRCWXYHA5CNFSM4KU2YBXKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4INMMGSQ, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH24TPURVUS6DB72PII6E33RCWXYHANCNFSM4KU2YBXA .

mbpictures commented 4 years ago

Well... no, I haven't AdMob integrated yet, because I wanted to get the consent SDK working. Is the implementation of admob necessary in order to use the consent SDK?

rareserban commented 4 years ago

Well, consent actually about ads...

On Fri, Feb 14, 2020, 14:37 Marius notifications@github.com wrote:

Well... no, I haven't AdMob integrated yet, because I wanted to get the consent SDK working. Is the implementation of admob necessary in order to use the consent SDK?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/googleads/googleads-consent-sdk-android/issues/104?email_source=notifications&email_token=AH24TPQXXAKTC3D5OTJPMU3RC2GA7A5CNFSM4KU2YBXKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELY4QKI#issuecomment-586270761, or unsubscribe https://github.com/notifications/unsubscribe-auth/AH24TPUSKM46BG5S5ORI7N3RC2GA7ANCNFSM4KU2YBXA .

mbpictures commented 4 years ago

I solved it. I had several mistakes in my implementation:

  1. I called "show" immediatly after "load" which caused an "Consent form was not ready to be displayed error"
  2. I used the getApplication().getContext() method to instantiate the consent sdk. With "MainActivity.this", it works