From the course: Android Development Tips
Unlock this course with a free trial
Join today to access over 22,400 courses taught by industry experts.
Send request parameters with Retrofit - Android Tutorial
From the course: Android Development Tips
Send request parameters with Retrofit
- [Instructor] In the last couple of tips I've described how to use retrofit, an open source library for making web service calls. I showed how to make calls both synchronously and asynchronously. Now, I'll describe how to send a parameter with the get request so that you can filter the data that's returned from a web service. Let's go back to the web service that I'm using. It's at this URL. This particular web service is defined so that you can pass in a parameter named, category, and you'll filter the data based on the category field. I'll start with question mark for a query string, and then I'll select category equals desserts, and I get back just the desserts, apple pie, cheesecake and so on. I can change that to, entrees, and then I'll get back all the entrees or I can change it to, starters. Now, you have to pass in exactly the right value. For example, if I say, category equals something, I won't get back anything. So, there isn't a lot of error handling with this particular…
Contents
-
-
-
Communicate with Snackbar messages6m 15s
-
Manage view components with Butter Knife6m 41s
-
Create a reusable dialog class9m 22s
-
Convert a layout to ConstraintLayout7m 13s
-
Manage global data with singletons5m 37s
-
Convert image files to WEBP format6m 5s
-
Create an Espresso user interface test5m 18s
-
Create classes for Android with Kotlin5m 12s
-
Run background tasks in intent services8m 51s
-
Send broadcast messages with EventBus8m 44s
-
Handle events with Java 8 syntax5m 51s
-
Improve forms with design layouts7m 55s
-
Display draggable rows in a list of data8m 1s
-
Manage persistent data with Realm10m 23s
-
Play an audio file from assets8m 56s
-
Send an SMS message from an app7m 56s
-
Get a list of audio files on a device8m 32s
-
Play sounds with SoundPool8m 45s
-
Display the build date of an APK file6m 47s
-
Build Kotlin classes with properties7m 32s
-
Manage versioning with Gradle variables6m 8s
-
Use reporting tools from the Google Play Console4m 44s
-
Make web service calls with Retrofit10m 39s
-
Make asynchronous calls with Retrofit4m 6s
-
Send request parameters with Retrofit4m
-
Upgrade a project to Android Studio 3.04m 47s
-
Clean up calls to findViewById()2m 58s
-
Create adaptive launcher icons5m 47s
-
Use XML and downloadable fonts6m 40s
-
Explore a device's file system4m 55s
-
Profile an app's memory usage3m 52s
-
Manage an SQLite database with Room9m 17s
-
Manage background threads with Executors5m 32s
-
Track vital stats in a published app3m 4s
-
Inspect database files with DB Browser4m 41s
-
Execute tasks with JobScheduler7m 29s
-
Create Room entity classes in Kotlin8m 22s
-
Create Room DAO classes in Kotlin4m 13s
-
Upgrade to Android Studio 3.13m 22s
-
Convert a project to use Kotlin3m 20s
-
Handle events with Kotlin lambdas6m 13s
-
Manage menus with when3m 44s
-
Define global constants with Kotlin6m 12s
-
Use Kotlin data and enum classes5m 24s
-
Create inheritance hierarchies in Kotlin6m 8s
-
Manage data collections in Kotlin5m 45s
-
Sort data collections with Kotlin5m 33s
-
Filter data collections with Kotlin3m 52s
-
Create Kotlin extension functions2m 31s
-
Use support functions from Android KTX4m 30s
-
Use virtual devices with Google Play3m 50s
-