2

I am getting the following error while trying to download file with DownloadManager:

[5007] Stop requested with status HTTP_DATA_ERROR: Hostname my.host not verified:

How can I add this hostname as verified for my app, so DownloadManager will download my file?

Pavel Poley
  • 5,307
  • 4
  • 35
  • 66
  • see https://stackoverflow.com/a/15252178/192373. TL;NR: the server does not have a valid certificate on the HTTPS connection. – Alex Cohn Jun 15 '20 at 16:15
  • Yes, but I wonder if I can trust this unverified link somehow, like security rules for Retrofit – Pavel Poley Jun 16 '20 at 19:48
  • 1
    There are two ways out: you can 'whitelist' this certificate (e.g. if it is outdated), or fix this on the server side. – Alex Cohn Jun 17 '20 at 13:38
  • The third way is to add this host via [Network security configuration](https://developer.android.com/training/articles/security-config) – Alex Cohn Jun 21 '20 at 09:13

0 Answers0