0

I'm trying to use readium 2 library for my android project. I cloned r2-workspace-kotlin repo. I launched the app on some of my test devices. I noticed that on one device the app is unable to render some pages. Instead of what should be a page of the book I get a page saying Webpage not available. The device is running android 7.1.2 but it's not related to android version as I tested the app on emulator running the same version and it worked. Anyone has any ideas how to fix it?

enter image description here

Egis
  • 5,081
  • 5
  • 39
  • 61
  • do you know what `127.0.0.1` is? – Vladyslav Matviienko Jan 21 '19 at 12:35
  • `127.0.0.1` or `localhost` is address used to establish an IP connection to the same machine or computer being used by the end-user. – Egis Jan 21 '19 at 12:37
  • right, it is `the same device`, so when you are trying to access it **from the phone**, it will refer **to the same device** - **the phone**. Are you sure you are running the web server on the same device (the phone)? – Vladyslav Matviienko Jan 21 '19 at 12:39
  • I don't have a deep understanding of how readium library works. What I see is that it renders some pages correctly but fails to render other pages and it happens on the same book. I was hoping for an answer from someone who has dealt with this problem and found a solution. – Egis Jan 21 '19 at 12:44
  • the problem is that you somehow are trying to open the `127.0.0.1:xxx/xxx` url in your webView. This sends the request to **the same machine**, which means to the Android phone itself. And as your Android phone does not run the web server on port `45685`, it will not work. I don't think that somebody can understand why you request this url without you showing any code. – Vladyslav Matviienko Jan 21 '19 at 12:50

0 Answers0