POS_Sprint_6 #8
@ -295,22 +295,20 @@ namespace Klient.Droid
|
||||
if (response.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
var jsonString = await response.Content.ReadAsStringAsync();
|
||||
dynamic jsonObject = JsonConvert.DeserializeObject(jsonString);
|
||||
FindViewById<TextView>(Resource.Id.ErrorPhoto).Text = "Przesłano zdjęcie!";
|
||||
SetContentView(Resource.Layout.ekranZLinkami);
|
||||
var second_response = await client.GetAsync("http://10.0.2.2:5001/api/Search", jsonObject.response);
|
||||
var second_response = await client.GetAsync($"http://10.0.2.2:5001/api/Search/{jsonString}");
|
||||
if (second_response.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
var second_jsonString = await response.Content.ReadAsStringAsync();
|
||||
dynamic second_jsonObject = JsonConvert.DeserializeObject(second_jsonString);
|
||||
|
||||
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonObject);
|
||||
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonString);
|
||||
|
||||
int end = 10;
|
||||
if (fullLink.Count < 10) end = fullLink.Count;
|
||||
for (int i = 0; i < end; i++)
|
||||
{
|
||||
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].Title + ": " + fullLink[i].Link + "\n\n";
|
||||
FindViewById<TextView>(Resource.Id.links).Text = FindViewById<TextView>(Resource.Id.links).Text + fullLink[i].title + ": " + fullLink[i].link + "\n\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -348,7 +346,6 @@ namespace Klient.Droid
|
||||
if(second_response.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
var second_jsonString = await second_response.Content.ReadAsStringAsync();
|
||||
|
||||
List<SearchResult> fullLink = JsonConvert.DeserializeObject<List<SearchResult>>(second_jsonString);
|
||||
|
||||
int end = 10;
|
||||
|
Loading…
Reference in New Issue
Block a user