Build a Yelp Clone in Android Ep 3 Retrofit Setup- Networking in Kotlin Android Studio

Опубликовано: 23 Январь 2020
на канале: Rahul Pandey
3,117
60

This video (episode 3 of 6) starts from a new project and completes an API request to the Yelp API using the Retrofit library and GSON. We setup Retrofit and make a successful call to the business search endpoint of the Yelp API. The next video will make better use of the JSON response by turning them into models we can use.

➤ Next video:    • Build a Yelp Clone in Android Ep 4 Da...  

Useful links:
➤ Codepath Retrofit guide: https://guides.codepath.com/android/c... (official docs from Square: https://square.github.io/retrofit/)
➤ API documentation for our endpoint: https://www.yelp.com/developers/docum...
➤ HTTP response codes: https://developer.mozilla.org/en-US/d...
➤ Playlist link for project:    • Android Yelp Clone with Networking  

Troubleshooting if you can't get JSON data back:
Validate that your emulator has internet (e.g. open the browser or YouTube and see if it works). Try to restart the emulator if internet isn't working.
Make sure you've added the Internet permission to the manifest.
Make sure you have correctly copied the base URL, endpoint, parameter names, and the API key.
Uninstall the app from the emulator and allow it to be fully re-installed by relaunching it from within Android Studio.
Use a program like Stetho to validate what network requests are happening from your device.


Смотрите видео Build a Yelp Clone in Android Ep 3 Retrofit Setup- Networking in Kotlin Android Studio онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь Rahul Pandey 23 Январь 2020, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 3,117 раз и оно понравилось 60 людям.