From the course: Machine Learning in Mobile Applications
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Client tie to Visual Recognition response - Xamarin Tutorial
From the course: Machine Learning in Mobile Applications
Client tie to Visual Recognition response
- [Instructor] Now we're ready to call the web service. So we'll do var response, and that's going to be equal to await 'cause that's an asynchronous call, the client and we'll call PostASync. We're going to pass in our URL and the request content. And if we get a success status code back, we'll continue on, otherwise we're just going to hop out of this method. And if it is successful, we need to pull up the response strength, so we're going to create a variable called contentString. That's going to be equal to await_response dot content ReadAStringAsync. And that will pull out a JSON object, or at least a string that represents a JSON object. Now we could create classes and de-serialize a string that way, but we can also do this inline using anonymous object. This is a very complex JSON object with several internal arrays, but it's just simple enough where we should be able to do it inline. So I'll go var definition equals new, and this is going to be a JSON object with a property…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Overview of Watson2m 1s
-
(Locked)
Natural Language Understanding: Set up2m 15s
-
(Locked)
Natural Language Understanding: Train the model5m 32s
-
(Locked)
Visual Recognition: Set up1m 41s
-
(Locked)
Visual Recognition: Train the model5m 39s
-
(Locked)
Create a custom model3m 37s
-
(Locked)
Train and deploy a custom model4m 2s
-
(Locked)
Install client SDK package3m 45s
-
(Locked)
Client tie to Natural Language6m 49s
-
(Locked)
Client tie to Visual Recognition call setup7m
-
(Locked)
Client tie to Visual Recognition response5m 26s
-
(Locked)
Client tie to custom model: Get an access token6m 4s
-
(Locked)
Client tie to call custom model service8m 44s
-
(Locked)
Client tie to get custom model response2m 59s
-
(Locked)
Run the client app3m 27s
-
-
-
-
-