knjk04 / Bookshelf

Android book wishlist app
GNU General Public License v3.0
1 stars 1 forks source link

Can't load in a thumbnail with Picasso #12

Closed knjk04 closed 5 years ago

knjk04 commented 5 years ago
String path = "http://books.google.com/books/content?id=5QRZ4z6A1WwC&printsec=frontcover&img=1&zoom=1&edge=curl&imgtk=AFLRE737lhXUE-bBsInXxWIrtA3OlJHhyhf2Emg8MYvLe5XXkOPHeGRj7Qu6ylJ406t6uJ4r3VQHZLTgdoTplV_geRlKTVynqamUtP6AlHE8gTQUcyNCXKUr1D0HAw4N4Nf9ClGffYog&source=gbs_api";
Picasso.get().load(path).into(imageView);

The thumbnail isn't being loaded in. The URL is correct because it works in a web browser. Also tried with Glide. Imgur links (such as this: https://i.imgur.com/6zDqjm8.jpg) work fine with the code above when the path is assigned to the imgur link).

This is just a test to see if a thumbnail can be loaded in. If it works, the RecyclerView CardView list can show thumbnails.

Branch: experimental Class: MainActivity (lines 42-44)

knjk04 commented 5 years ago

Fixed in commit https://github.com/knjk04/Bookshelf/commit/b2d05e2ff75e3b2c05d54f7df5d73b4e20218d13.

Fresco was used, but Picasso probably would have worked, too. The problem was that http requests can't be made to Google's servers anymore, so https needs to be used