Advanced Xamarin Forms [Connecting to Web Services] Part2

  Рет қаралды 61,641

Houssem Dellai

Houssem Dellai

Күн бұрын

Пікірлер: 264
@ramkalrahrah2335
@ramkalrahrah2335 7 жыл бұрын
The Best !!!!!! There is no such tutorial anywhere else THANK YOU & WISH YOU THE BEST
@vincentnwonah618
@vincentnwonah618 7 жыл бұрын
Good day and thanks for this tutorial, especially the way your first explained on the white board. I didn't understand the part where you added the first controller then, when exactly did you create the database? How can I modify this project to use an existing database instead of creating a new one? Thank you
@edsondionisio9750
@edsondionisio9750 8 жыл бұрын
Hello Housseem, how are you? The classes are very good, but I have problems in obtaining data from the database to the application of android. In the application of the UWP it worked perfectly. The example was the same as shown in the classes. Could you help me with this problem?
@moezfehri4135
@moezfehri4135 7 жыл бұрын
ps: RestClient generic class although it won't work for different classes because of the constant WebServiceUrl excellent video houssem really helped !
@stevensquires4136
@stevensquires4136 4 жыл бұрын
Houssem Great Tutorial - simple and easy to follow! I am however having a problem with Part 2. The RestClient Folder does not get created in any of my projects. I'm using VS 2019.
@samialfarra4275
@samialfarra4275 8 жыл бұрын
شكرا جزيلا أفضل شرح رأيته حتى الان
@HoussemDellai
@HoussemDellai 8 жыл бұрын
+Sami Alfarra thank you, that is motivating for me :)
@parthtrehan8668
@parthtrehan8668 7 жыл бұрын
it is working fine with UWP but for android it is not working because the employeesList does not get filled with data
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
In 42:27 minute part of the video, you changed the URL of the Web Service so that whenever you run the program, that link will be the root page. In my case, what's happening is that it didn't change my rootpage. Why is that so?
@HoussemDellai
@HoussemDellai 8 жыл бұрын
The new link is used to get the list of employees from the web service (not for changing the rootpage).
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
Ooh. But still it's not working Sir. :(
@Kallu6080
@Kallu6080 7 жыл бұрын
@Houssem Dellai , Sir, i followed your tutorial to dynamically showing the list of items from sql to a listview using web api and it worked well. Now when an item is clicked on the listview , I want to pass the id of the item to the next page. How can i do that sir?
@AnsXenic
@AnsXenic 4 жыл бұрын
Im using vs 2019 , why when i create my app i only saw a 'Dependencies' and not 'Properties' and 'References' like you ? because the Androidproject(child of the master project in xamarin) have it
@vijaym7838
@vijaym7838 7 жыл бұрын
I followed the same code but the result came blank. But the async skipped in constructor seems to be issue for me, my page loads before data is fetched. Feeling like my INotifyPropertyChanged didnt do anyth.
@tajelamine6517
@tajelamine6517 7 жыл бұрын
Did you later solve you issue ?
@PowerAndP-g3v
@PowerAndP-g3v 6 жыл бұрын
use Conveyor by Koti software in and use the ip address
@ansgemar2120
@ansgemar2120 6 жыл бұрын
Hi Aman Abebe, How I can use it?
@Arcade_Archie
@Arcade_Archie 5 жыл бұрын
I installed Plugin.RestClient but somehow Visual Studio doesnt find the Plugin.RestClient Namespace
@julianhofmaninger9721
@julianhofmaninger9721 4 жыл бұрын
I got the same problem...did you fix it?
@vincentmalinga5233
@vincentmalinga5233 4 жыл бұрын
Hi there, Any Solution u found regarding this Problem ?
@julianhofmaninger9721
@julianhofmaninger9721 4 жыл бұрын
@@vincentmalinga5233 no haven't solved it yet. Do you know a way?
@mahirgranov2410
@mahirgranov2410 8 жыл бұрын
Nice tutorial. Thank you! How can I publish the ASP.NET Web Service for external use? Right now, it only runs on localhost. If I change that to my local IP address I get a Bad Request...
@ohhi4105
@ohhi4105 3 жыл бұрын
how did you solve this problem ? Thanks anyway
@sandeepraja1470
@sandeepraja1470 7 жыл бұрын
Hi @HoussemDellai, I'm creating a xamarin forms app, installed necessary package as you mentioned. But when I run im getting an exception when var taskModels = JsonConvert.DeserializeObject(json); is called. Shows "The name 'JsonConvert' does not exist in the current context" but i have installed all the packages. It is a runtime exception.
@cheahengsoon
@cheahengsoon 8 жыл бұрын
Houssem, any reference for Login without using social media solution?
@juanpablotorres2143
@juanpablotorres2143 6 жыл бұрын
I have some issue I am trying to read the users and check in a login page if the account exists using the web service but the program crash using the last method Task
@piyushjagraj429
@piyushjagraj429 7 жыл бұрын
Hi Houssem I tried your way and it worked perfectly but i am facing a problem that when i added a button in the list view the button is not getting triggered in MVVM kind of a deadlock situation can you help??
@nadaalangari7020
@nadaalangari7020 7 жыл бұрын
السلام عليكم استاذ حسام لقد فعلت كما فعلت بالفيديو لكن في اخر الفيديو عندما عملت ديبلومينت على الايموليتر لم يظهر شيء اصبجت الصفحه فارغه لا اعلم بالسبب لكن في البدايه والبيانات ستاتك في الفجول كانت تظهر
@adamhrin
@adamhrin 7 жыл бұрын
Hello Houssem, if I want my application work properly, I have to Set StartUp Projects > Multiple projects, and start both Web App and Xamarin App, only then it is working. Why you did not have to do that and it is working for you?
@cheahengsoon
@cheahengsoon 8 жыл бұрын
I saw a two nuget, the nuget you show in Video is just for Windows, another nuget "Plugin.XamarinForms.RestClient" is for all Plugforms?
@potatoml4631
@potatoml4631 3 жыл бұрын
salut houssem ! j'ai suivi ta vidéo et quand j'ai ajouté le Plugin.RestClient le dossier dans la vidéo ne c'est pas ajouter, que faire ?
@GJAB822
@GJAB822 7 жыл бұрын
Hi Houssem, How do you define the relation between tables? yo define all the tables with their primary key and then define the foreign key? or how is that process in this case?
@FalcoAcePilot
@FalcoAcePilot 7 жыл бұрын
ok but does it have to be windows, when you test if the data drom the db is showing in the application or can it be android too?
@sonu7may
@sonu7may 6 жыл бұрын
Hi Houssem, I have install vs2017, but can not be see cross platform portable (Native and Forms) , please tell me
@esmailzare788
@esmailzare788 4 жыл бұрын
Hi Houssem, There is an error when I do compile. Can not resolve refrence: "system.xaml.Hosting", referenced by "TestApp>WebServicesD>System.Web.Mvc>System.web.Extencions>System.ServiceModel.Activation>System.ServiceModel.Activies. Please add a NuGet package or assembly reference for "System.Xaml.Hosting" or remove the reference to "TestApp"
@creatortrainer9305
@creatortrainer9305 6 жыл бұрын
Dear Houssem Dellai, Just question: In case I need to search from two entity example: (Employee the name and Department name) two parameters and give result the query list of Jobs Entity in DB usually I need to create a stored procedure in SQL but how to call it in Controller and this staff? Not like this case only Employee. Best regards,
@unparadigman
@unparadigman 8 жыл бұрын
Is there Part1, about this serie?. Thanks a lot!
@BlalKhalidTech
@BlalKhalidTech 5 жыл бұрын
Hi I Follow same steps but my list is showing empty what's the reason?
@einsantony375
@einsantony375 7 жыл бұрын
I'm getting System.Net.WebHeaderCollection.AddValue error on httpclient.GetStringAsync() method. Any idea?
@juressic3881
@juressic3881 5 жыл бұрын
How could i access to my MySql database with that string? 52:36
@dribbler8131
@dribbler8131 7 жыл бұрын
Hi Houssem, I have followed your tutorial and when i test on Android it fails to return values from Database, The line which says var json = await httpClient.GetStringAsync returns nothing any ideas why? I have changed the WebServiceUrl to the ASP one and when i paste to the browser it shows the database entries. Seems from reading the comments I am not the only person who is struggling to get this to work on Android, If you could advise how we all could get this to work on Android it would be appreciated, Thanks! Thanks for the good tutorials!
@FadelTrivandiDipantara
@FadelTrivandiDipantara 8 жыл бұрын
When I try to run in my Android Emulator, there's no data on the list, Can you help me? It works fine when I try on my iPhone Emulator. Do I need permission or anything in the manifest (like Internet etc)?
@vincentmalinga5233
@vincentmalinga5233 4 жыл бұрын
same problem here, did u solve yours ?
@jesuszorrillauceta3410
@jesuszorrillauceta3410 4 жыл бұрын
Hola el plugin restclient creado por ti no me funciona para visual studio 2019 me gustaria otras alternativas.... y esta bien explicado tu tutorial
@gavinboyd2391
@gavinboyd2391 6 жыл бұрын
Hi Houssem, I am getting the same as others: no data returned to the App once all code completed correctly (even after trying to rig a work around by manually inputting rest client.cs due to it not working in VS2017). A lot of people on here need a solution for VS2017 Houssem, if you could give us some advice it would be much appreciated. Cheers
@realestateZimbabwe
@realestateZimbabwe 5 жыл бұрын
did you get the answer correctly
@pavelsvec5073
@pavelsvec5073 5 жыл бұрын
Hi Gavin. 1. The server returns XML, but RestClient tries to Deserialize from JSON format . 2. You can't access localhost from the Android emulator - you have to mock the api on Postman or something like that. Also note that Android Pie does not allow the open text communication between app and server - has to be configured. Quite painful experience.
@mattstrong8281
@mattstrong8281 6 жыл бұрын
Excuse me, how can I connect to a remote database from here, perhaps by Azure, and replace the localhost? I want to get my project hosted so that everyone can access some kind of database rather than a local database on my computer. Thanks!
@luisfbadel
@luisfbadel 6 жыл бұрын
When I create the Employee controller 17:48 I have an error "Employee: : has no key defined. Define the key for this EntityType..."
@shhamidi5989
@shhamidi5989 6 жыл бұрын
Hi.thanks lot Why My project doesnt creat database connection? I cant find database in server explorer.
@DarylsWorld
@DarylsWorld 3 жыл бұрын
Hi @Houssem, when I right click on controllers folder and add new controller. the "Web API 23 Controller with actions, using Entity Framework" is missing. What do I do? 17:51
@DarylsWorld
@DarylsWorld 3 жыл бұрын
Problem solved, I just updated my Xamarin and it appeared.
@HoussemDellai
@HoussemDellai 3 жыл бұрын
@@DarylsWorld Great to hear that :)
@DarylsWorld
@DarylsWorld 3 жыл бұрын
@@HoussemDellai Thanks but, then I was adding a new controller and then a new error appeared. Is says "There was an error running the selected code generator: 'The entity type 'Employee' requires a primary key to be defined. If you intended to user keyless entity type call 'HasNoKey()'' "
@DarylsWorld
@DarylsWorld 3 жыл бұрын
Again sorry, I didn't put "public int Id { get; set; }" in webservices.
@santanukumarprusty6592
@santanukumarprusty6592 4 жыл бұрын
When I am writing the URL in chrome browser of my emulator I got bad request error??? Any solution??
@haydarm.al-samawe9819
@haydarm.al-samawe9819 7 жыл бұрын
i think there is many changes happen in VS 2017 from controller i have many problems is there is any new video about how to make same project in VS 2017?
@HoussemDellai
@HoussemDellai 7 жыл бұрын
haydar M.Al-samawe you can do the same by choosing ASP.Net project (.Net Framework)
@haydarm.al-samawe9819
@haydarm.al-samawe9819 7 жыл бұрын
Thank you Houssem for your fast response i really appreciate , now everything is OK , just have problem its not work in Android emulator , but i see in other comment many thread i will try ,, respect
@avinashramireddy4290
@avinashramireddy4290 7 жыл бұрын
Good tutorial. My services are coming from repository. I need to refresh my list(in mobile device)when new items are added to db. Everything is binded properly.Just unable to make it refresh automatically. Just started using xamarin two days ago. Please guide.
@lordmorgoth7
@lordmorgoth7 6 жыл бұрын
I installed plugin.RestClient but it doesn't create the classes nor it says newtonsoft.json it's installed in references. I should mention I'm using VS2017 and it doesnt have the "portable" project. I'd ppreciate help here hehe
@lordmorgoth7
@lordmorgoth7 6 жыл бұрын
I tried to workaround this issue, copying your Github code of RestClient class. When I run the app it doesn't display anything, It happens that var json (restClient class) doesn't get the host and it just skips and the GetAsync method is never finished.Therefore the data is never fetched
@SumitSharma-oz3tq
@SumitSharma-oz3tq 8 жыл бұрын
Not showing results in physical device and in [android emulator, ios simulator]? any solution
@dia2681
@dia2681 8 жыл бұрын
I've successfully follow the step until the end when the list of employee from database shown at the screen but only in Windows platform only. When I run using Android, nothing shown. Why it happen? Is this only for Windows? Pls help, Tq
@chaliiid
@chaliiid 5 жыл бұрын
the web thing services not secure .. this is good option to public share data .. but this it not go work with applications, so is there any MS response tech to dealing with it ..
@grigorescunicolae3150
@grigorescunicolae3150 8 жыл бұрын
Do you know any similar tutorials using WCF services ?
@santanukumarprusty6592
@santanukumarprusty6592 4 жыл бұрын
Hlw sir in visual studio 2019 the folder rest client does not generated automatically. So what I have to do ????
@danielbiniam2489
@danielbiniam2489 5 жыл бұрын
I don't have the view files how can i get it?
@samirlalani1
@samirlalani1 8 жыл бұрын
hii houssem dellai ...i have jason String as output from my web Api like this:: [{"username":"17400100010951","password":"17400100010951","userid":32101,"Lname":"alyani","Fname":"Asif","Image":"userimg.jpg","Stud_Id":"150020005","IsConfirm":0}] and i want to display data on xamarin.forms in different different labels how should i remove commas and all those braces ?
@hassanesilverlight1550
@hassanesilverlight1550 7 жыл бұрын
Hi Houssem, I tried to flow this tutorial, but i have some issues with my visual studio 2017 : 1st i can not find References in my PCL project , 2nd: after i install Plugin.RestClient package it did not create RestClient class .so please if you know why please shoot me a message .Thank you
@HoussemDellai
@HoussemDellai 7 жыл бұрын
Hassane Silverlight do you have VS 15.5.1 ? Check if it creates a .netstandard project instead of PCL
@samialfarra4275
@samialfarra4275 6 жыл бұрын
i have problem with visual studio in 2017 when install plugin.ResctClient no reference Package Microsoft.Net.Http 2.2.29 was restored .Net Framwework 4.6.1 instead of project target framework .Net Standard version =2
@ankitsahu4118
@ankitsahu4118 5 жыл бұрын
i an getting error on adding pliugin.restclient not adding extra folder aur plugin properly in VS2017
@joeoke6933
@joeoke6933 6 жыл бұрын
Thanks @Houssem Dellai ,my application is running Full . But can you help me How when I want to parse Web Service Asmx in my WebServiceUrl? Sorry my English is not Good
@malikjehangir3337
@malikjehangir3337 6 жыл бұрын
Hi, How to consume azure machine learning web service API in xamarin forms?
@BlalKhalidTech
@BlalKhalidTech 5 жыл бұрын
how to perform validation in xamrine forms?
@refkabenmahmoud2186
@refkabenmahmoud2186 7 жыл бұрын
hi Houssem thanks for sharing, i am using your plugin to consume web services, i need to know how to retrieve the cookies from the httprequest! i tried many examples of code but it always returns 0 cookies, please i need answer Thanks again
@wongchinyung9887
@wongchinyung9887 4 жыл бұрын
At 38:59 after i install RestClient in Nuget the RestClient folder is not auto generated in my project. Any solution?
@risteastefan300
@risteastefan300 4 жыл бұрын
Have you solved this? I get the same error.
@wongchinyung9887
@wongchinyung9887 4 жыл бұрын
@@risteastefan300 not yet. I have give up on this.
@samialfarra4275
@samialfarra4275 8 жыл бұрын
please question by experiance what do you prefer xamarin or ionic or native ios and android . what is things i can't do with xamarin and can do by native platform
@HoussemDellai
@HoussemDellai 8 жыл бұрын
+Sami Alfarra Hi Sami, thhat's a really big question ! That depends on: 1) what you/your team are good at. 2) The amount of investment in the mobile app project. 3) The experience of your team. 4) And even how much the client is ready to pay. This video will give you a better overview: kzbin.info/www/bejne/oaO4f4yCptanfck.
@samialfarra4275
@samialfarra4275 8 жыл бұрын
Do you think that xamarin can do any thing that native ios or android can do like camera gprs viberation and notification. Iam 1 person and have experiance in c# and android but not in ios ?
@HoussemDellai
@HoussemDellai 8 жыл бұрын
+Sami Alfarra yes Xamarin, and also Cordova, have access to harware capabilities (camera, GPS, Accelerometer,...).
@gonzajaimes
@gonzajaimes 6 жыл бұрын
Hi Houssem. Thanks for the tutorial, I´ve been using .net core to try to replicate it, all is fine but I cannot reflect my Employees context on the Data Connections (min 35:10) It doesn´t show the database on the server explorer. I run the mvc controller and it populates fine.
@theafricanwalkchannel4302
@theafricanwalkchannel4302 6 жыл бұрын
hello Sir, please i want to connect to mysql database rather than the database context.
@shhamidi5989
@shhamidi5989 6 жыл бұрын
Hello. Bindingcontext in xaml doesnt work why? Thx
@HoussemDellai
@HoussemDellai 6 жыл бұрын
You write it yourself if it doesn't show up in intellisence
@shhamidi5989
@shhamidi5989 6 жыл бұрын
Thx
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
Good Day Sir. I just wanna ask, how can I access elements from two different database tables?
@HoussemDellai
@HoussemDellai 8 жыл бұрын
Just make 2 GET calls to each web service / table :)
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
Oooh :) In your example you use Employee to be your test subject and created a restclient for that. What if I want to add a record of a Customer, should I make a seperate restclient?
@HoussemDellai
@HoussemDellai 8 жыл бұрын
You can (and should) use the same client.
@rynexakil7443
@rynexakil7443 5 жыл бұрын
hi i did not find the folder restclient at 43:00 and i have this>>> Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Microsoft.Net.Http 2.2.29' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. ouwer_home C:\Users\Rynex\source epos\ouwer_home\ouwer_home\ouwer_home.csproj 1 Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Newtonsoft.Json 8.0.2' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. ouwer_home C:\Users\Rynex\source epos\ouwer_home\ouwer_home\ouwer_home.csproj 1 Severity Code Description Project File Line Suppression State Warning NU1701 Package 'Microsoft.Bcl 1.1.10' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project. ouwer_home C:\Users\Rynex\source epos\ouwer_home\ouwer_home\ouwer_home.csproj 1
@luisfbadel
@luisfbadel 6 жыл бұрын
Can you do this but with stored procedures and DAL controllers?
@ansgemar2120
@ansgemar2120 6 жыл бұрын
Hello Luis Badel, did you can do it?
@joephishy7466
@joephishy7466 8 жыл бұрын
At first I want to give some compliments to you Houssem for this videos. This part runs fine on my Windows Phone but sadly not on Android. :-( My application breaks down because it hasn't the HttpClient availabe to run. Do you have any idea what I have to install to get it running on Android? This would be very helpfull ;-)
@abergish
@abergish 6 жыл бұрын
From where can the source code be downloaded?
@shhamidi5989
@shhamidi5989 6 жыл бұрын
How creat dataconnection? I dont want use azure service .can i use your education?
@HoussemDellai
@HoussemDellai 6 жыл бұрын
sh hamidi you can definitely use any Cloud provider that supports AspNet
@shhamidi5989
@shhamidi5989 6 жыл бұрын
Thx very much .
@neilsukalikar4257
@neilsukalikar4257 8 жыл бұрын
Hi Houssem , Can you please upload one CRUD example which will be with sqllite and sql server. How it will update locastorage by feching data from api and etc
@Karthadasht
@Karthadasht 8 жыл бұрын
HI houssem once i try to create the MVC 5 controller i get this error message "there was an error getting the type try rebuilding the project"
@ahmadasiri5106
@ahmadasiri5106 8 жыл бұрын
after creating model try to rebuilding your project
@edmondikacajBajze
@edmondikacajBajze 8 жыл бұрын
Why show me a error connection failure can help please
@mikor7878
@mikor7878 5 жыл бұрын
tu es le meilleur houssam, fiere de toi!
@DarylsWorld
@DarylsWorld 3 жыл бұрын
Hello sir Houssem, I have a problem in XamarinDemoApp c# I'm installing RestClient on it. But no folder like RestClient appeared and no references. I can't figure it out.
@nehadzinaldin9208
@nehadzinaldin9208 3 жыл бұрын
i have the same Problem any Solving thnx a lot
@DarylsWorld
@DarylsWorld 3 жыл бұрын
@@nehadzinaldin9208 I was able to solve it. Now I watched his Xamarin tutorials about CRUD Operation up to logout. I managed to do it all. Thanks to him.
@nehadzinaldin9208
@nehadzinaldin9208 3 жыл бұрын
@@DarylsWorld please say me how i need that
@DarylsWorld
@DarylsWorld 3 жыл бұрын
@@nehadzinaldin9208 It's a tutorial about, create web API, and create mobile app with user and password registration, with create,read,update and delete function, watch it from video 1 to video 10 here is the link: kzbin.info/aero/PLpbcUe4chE78YvgIMtmgNEmRGyGJcsQdF
@sourcephy6208
@sourcephy6208 7 жыл бұрын
Thanks Houssem Dellai.
@kiranwilson7527
@kiranwilson7527 4 жыл бұрын
Sir, Thank you for this detailed tutorial, I was just following this tutorial, I am using vs2019. But when I add RestClient package, as you said RestClient Folder didnt create automatically. Can you please help me out to find out what I am missing.
@mohtaher7009
@mohtaher7009 3 жыл бұрын
Hi, did you find the file? I'm facing same problem
@PowerAndP-g3v
@PowerAndP-g3v 6 жыл бұрын
BRO the mobile version dont replay the employee list
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
@Houssem Dellai What project do I need to run? Is it the WebServices Demo or XamarinDemoApp(Portable) ? I'm having trouble on how am I going to show the List of Employee that we have created on the Web, because everytime I run the program, the content of MainPage.xaml that is in the XamarinDemoApp(Portable) is the one that appear.
@HoussemDellai
@HoussemDellai 8 жыл бұрын
You should right click your solution -> Set Startup Projects, then choose "Multiple Projects and select the ones you want to run (web services and Android/Windows) :)
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
I was able to set Multiple start up project in my Solution. The Web Services is running as well as the android, but the List that we created is not appearing on the MainPage.xaml. Can you check my code please?
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
Here's my codes Sir. pastie.org/10851179#3 - MainPageMain.xaml pastie.org/10851180 - MainViewModel.cs The sample label I created was the only thing that appear on my screen.
@HoussemDellai
@HoussemDellai 8 жыл бұрын
In your MainPageMain.xaml, both the ListView and Label should be inside a StackLayout :)
@jcevangelista4200
@jcevangelista4200 8 жыл бұрын
I already did that. But what happen is it just seems to have big blank space and at the bottom part is my Label. Still, the list of employee does not appear.
@hasanen9
@hasanen9 8 жыл бұрын
Beautiful subject we want more lessons
@HoussemDellai
@HoussemDellai 8 жыл бұрын
+‫حسنين امير‬‎ thanks :)
@nehadzinaldin9208
@nehadzinaldin9208 3 жыл бұрын
any help Please i cant find Folder Restclient pleaseee help me
@abdullahalhammad1455
@abdullahalhammad1455 4 жыл бұрын
أغلب المتابعين عرب وانت عربي .. ياليت عندنا محتوى قيم مثل هذا ولكن بالعربي
@HoussemDellai
@HoussemDellai 4 жыл бұрын
لم أجد متطوعا للترجمة
@albertomcrio
@albertomcrio 6 жыл бұрын
Using VS2017 worked for me with some modifications: from NuGet download the latest Microsoft.Net.Http and Newtonsoft.Json and find a RestClient.cs from Houssem repository projects. However RestClient public async Task GetAsync() retreives a null list, changing it to public async Task GetAsync() (e.g. not generic class type) works. Do you know why this could happen? From UserServices the initialization seems to be correct RestClient restClient = new RestClient(); var list = await restClient.GetAsync();
@Min0x
@Min0x 6 жыл бұрын
Hey @Alberto Macario, I can't seem to find the RestClient.cs in Houssem's repository. Would you be so kind to upload the file yourself so I can download it. Thanks in advance.
@albertomcrio
@albertomcrio 6 жыл бұрын
You just have to download this and slightly edit: github.com/HoussemDellai/XamarinForms-Plugins/tree/master/plugins/RestClient/RestClient/RestClient/Client
@tajelamine6517
@tajelamine6517 7 жыл бұрын
hello, thank you for the tutorials. i tried the code, unfortunately it is not working for me. both the android and the UWP are returning blank activities as if there is no data in the database. can you please help me with that ?
@samialfarra4275
@samialfarra4275 6 жыл бұрын
Taj El Amine is there any solution for blank activity
@julianhofmaninger9721
@julianhofmaninger9721 4 жыл бұрын
I cann´t add "using Plugin.RestClient" do you know what´s the problem? I added the NuGet package Plugin.RestClient. Thanks in advance!
@wongchinyung9887
@wongchinyung9887 4 жыл бұрын
I have the same issue. The RestClient folder is not auto-generated after I install Plugin.RestClient in Nuget. Have u solve your issue?
@julianhofmaninger9721
@julianhofmaninger9721 4 жыл бұрын
@@wongchinyung9887 No I haven't solved it. Did you find a soloution?
@user-cz9bl6jp8b
@user-cz9bl6jp8b 8 жыл бұрын
First, thank you for your tutorials. I have tried the tutorial twice and I end up with the same problem. The request to get the employees does not work. One thing I noticed the second time trying the tutorial is when I add Plugin.RestClient, the System.Net.Http reference is not added. The other references are added. Could this be the problem. I tried to manually add the reference but could not. ------------------------------------------------------------ The following is what I have tried to figure out the problem. var employeesList = await restClient.GetAsync(); in EmployeesServices class returns an empty/null employeeList. In the RestClient class. When I run the code and set a breakpoint in the GetAsync() method, var employees = JsonConvert.DeserializeObject(json); is never reached. Do you have any ideas why this may be happening. Is it a async/await problem? Everything up to about 5 minutes left on the tutorial worked perfectly. IIS Express is running. For some reason, a connection with the server could not be established.
@HoussemDellai
@HoussemDellai 8 жыл бұрын
Please try to invoke it using the URL on the browser.
@user-cz9bl6jp8b
@user-cz9bl6jp8b 8 жыл бұрын
I solved my problem. I restored my OS to a much older previous backup, did all updates. Tried the tutorial again and this time it worked. After a while I assumed there had to be something corrupted because the code was exactly the same except for the localhost number. My best guess of what was causing the problem was a problem with a setting in the firewall dealing with security.
@ahmadasiri5106
@ahmadasiri5106 8 жыл бұрын
i was have same problem until i have open the port of my service in firewall> after that it work fine
@darkestbeforedawn6575
@darkestbeforedawn6575 7 жыл бұрын
i have same problem. but your solution doesnt work what can i do?
@roqaiyaalsulaimi9937
@roqaiyaalsulaimi9937 5 жыл бұрын
dear Houssem, i try to add plugin.restClient i find error, can help me please
@julianhofmaninger9721
@julianhofmaninger9721 4 жыл бұрын
I got the same problem...did you find a soloution?
@ermac9900
@ermac9900 7 жыл бұрын
السلام عليكم اخي طبقت الشرح خطوه بخطوه .. وكل شي ممتاز ولكن بالنهاية لا يعمل مع الاندرويد ما الحل اخي
@HoussemDellai
@HoussemDellai 7 жыл бұрын
خواطر بقلمي you need some config to connect Android to your local web services
@ermac9900
@ermac9900 7 жыл бұрын
هل يوجد فيديو لشرح ذلك ؟؟ ولدي سؤال اخر اخي . هل اعمل بنفس الطريقة لانشاء جداول اخرى ؟؟ انا اقصد كلاس RestClient هو موجه للاخذ من جدول واحد ماذا لو اردت اضافة جداول اخرى هل اقوم بنسخة وتغير اسمه فقط مع تغيير القيم بداخله ؟
@medachrefbenali7661
@medachrefbenali7661 7 жыл бұрын
Hi Houssem? Where i can find this config?
@feldondragon
@feldondragon 7 жыл бұрын
hey, man :) thx for the tutorial but please help me - how do i get connection to the DB which is in some server in the internet. I mean... I have somewhere a DB and i need to connect with that. Where in WebApi should I write this?
@HoussemDellai
@HoussemDellai 7 жыл бұрын
Feldon Dragon add the connection string to config.asax
@feldondragon
@feldondragon 7 жыл бұрын
Houssem Dellai ok, ill try soon. Thank you for fast resp. ;)
@feldondragon
@feldondragon 7 жыл бұрын
i add connection string in Web.config in variety of ways... and still cant connect properly using MySQL ;/
@HoussemDellai
@HoussemDellai 7 жыл бұрын
Feldon Dragon you will need the driver for mysql
@feldondragon
@feldondragon 7 жыл бұрын
ok, i found the right way... but now i have problem with RestClient... its return null... like it wont read the data form server.
@theafricanwalkchannel4302
@theafricanwalkchannel4302 5 жыл бұрын
please , i want to make the get data from Mysql rather
@rezaashena4892
@rezaashena4892 7 жыл бұрын
Thank you for your share,how about Android?
@WalidMoheyeldin
@WalidMoheyeldin 6 жыл бұрын
Hello, HttpClient showing encryption error with TLS https protocol Code: HttpClient client = new HttpClient(); Uri uri = new Uri($@"jsonplaceholder.typicode.com/posts/1"); string test = await client.GetStringAsync(uri); lblTest.Text = test; If the same code change Uri to http it will work fine. Knowing that it working fine locally but if you upload app to Google Play and install it it will not working or you can test by Xamarin Live Player it will no working too. How can handle https problem on PCL project ? Thanks
@anneezurike751
@anneezurike751 8 жыл бұрын
How can I get the source code for this video pls?
@geetas1988
@geetas1988 7 жыл бұрын
Sir, Tutorial was too good. But the problem is that when I run in Android, it didn't shows the Employee list. I had followed your tutorial 1 then 2. In the 1st part, Employee list was displaying. But when I had used webService (as shown in 2 part), it's not displaying any list. In one of the Xamarin Forums, I had read that rather then localhost, we should use ' 10.0.2.2' to make webservice run on Android. But it also didn't work. Please advice how to run on Android device.
@wondwossengebreab5178
@wondwossengebreab5178 7 жыл бұрын
We got the same problem i cant run in android phone too.. @Geeta s if you solve it please contact me. Thank you.
@MuhammadKhalid-hh8bu
@MuhammadKhalid-hh8bu 6 жыл бұрын
helo plugin.RestClient not work in .netstanderd cross plate form applictaions ..
@samialfarra4275
@samialfarra4275 6 жыл бұрын
please any solution for this i use visyal studio 2017 and error Package Microsoft.Net.Http 2.2.29 was restored .Net Framwework 4.6.1 instead of project target framework .Net Standard version =2
@pruebacorreo2981
@pruebacorreo2981 6 жыл бұрын
I hav the same problem, did you solve it ?
@issasaman
@issasaman 8 жыл бұрын
hello please give me the project you was working on with all changes you have made
@edmondikacajBajze
@edmondikacajBajze 8 жыл бұрын
hello houssem can you please upload a video to connect and work with local database thanks
@tsumiotoshi
@tsumiotoshi 6 жыл бұрын
Hello Sir, I got the warning when I added Plugin.RestClient >>>>> "Package 'Microsoft.Net.Http 2.2.29' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETStandard,Version=v2.0'. This package may not be fully compatible with your project." How can I solve this? Thanks in Advanced !
@pruebacorreo2981
@pruebacorreo2981 6 жыл бұрын
I have the same problem, did you solve it ?
@tsumiotoshi
@tsumiotoshi 6 жыл бұрын
I wrote the project again using Visual Studio 2015 and it works :D :D , because Plugin.RestClient does not work with VS2017 .net standard 2.0.
@samialfarra4275
@samialfarra4275 6 жыл бұрын
Thank you Houssem i uses your example in visual studio 2015 and all ok . but in visual studio 2017 when install package Plugin.RestClient i have error Microsoft.Net.Http 2.2.29 not compatible with framework 4.6.1 and Microsoft.BCL can i user System.Net.Http Package Microsoft.Net.Http 2.2.29 was restored .Net Framwework 4.6.1 instead of project target framework .Net Standard version =2 i spend 10 days and no solurions
@timchimento4300
@timchimento4300 6 жыл бұрын
I'm having the same issue trying to install the Plugin.RestClient in VS 2017. Any solution for this yet?
@neilsukalikar4257
@neilsukalikar4257 8 жыл бұрын
Please update video which shows running example for android . What configuration needs to be done in order to run from localhost.
@HoussemDellai
@HoussemDellai 8 жыл бұрын
This thread might help you: stackoverflow.com/questions/4779963/how-can-i-access-my-localhost-from-my-android-device
@neilsukalikar4257
@neilsukalikar4257 8 жыл бұрын
ok sure , I will check that . Also please upload some more advance videos as well which will clear xamarin.forms completely. You did very well and also there are very limited videos available online at this time. Cover some topics which shows CRUD from sqlite to web api
@yasarmalik2733
@yasarmalik2733 8 жыл бұрын
Hi @Nilesh. I can assist you with using android emulator to access local web api.
@neilsukalikar4257
@neilsukalikar4257 8 жыл бұрын
Yasar Malik thanks .. It would be nice if you can mention in simple steps
@yasarmalik2733
@yasarmalik2733 8 жыл бұрын
send me your email
@MrRanjithmurthy
@MrRanjithmurthy 7 жыл бұрын
Please can you can share the materials Link
@johabayanov1592
@johabayanov1592 6 жыл бұрын
Hossam could you help to me with bring out of data base client to my app
@Chrischek89
@Chrischek89 8 жыл бұрын
I got an Exception : System.Net.Sockets.SocketException: Connection refused at this point: var json = await httpClient.GetStringAsync(WebServiceUrl); (RestClient.cs) I did it in the same way like you. Do you have any ideas? Btw, very nice videos! Well done!
@HoussemDellai
@HoussemDellai 8 жыл бұрын
+Chrischek89 you get that error in Windows or Android emulator ? Note: for Android emulator, you should go through some steps to make it connect to a localhost web service (briannoyesblog.azurewebsites.net/2016/03/06/calling-localhost-web-apis-from-visual-studio-android-emulator/). For Windows emulator it should just work.
@hallolo2007
@hallolo2007 8 жыл бұрын
api/Employee didnt work it cant connect with db whats the problem? An error has occurred. The 'ObjectContent`1' type failed to serialize the response body for content type 'application/xml; charset=utf-8'. System.InvalidOperationException An error has occurred. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 52 - Unable to locate a Local Database Runtime installation. Verify that SQL Server Express is properly installed and that the Local Database Runtime feature is enabled.) System.Data.SqlClient.SqlException at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling) at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, DbConnectionPoolKey poolKey, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnectionPool pool, DbConnection owningObject, DbConnectionOptions options, DbConnectionPoolKey poolKey, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject, DbConnectionOptions userOptions, DbConnectionInternal oldConnection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionFactory.TryGetConnection(DbConnection owningConnection, TaskCompletionSource`1 retry, DbConnectionOptions userOptions, DbConnectionInternal oldConnection, DbConnectionInternal& connection) at System.Data.ProviderBase.DbConnectionInternal.TryOpenConnectionInternal(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.ProviderBase.DbConnectionClosed.TryOpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory, TaskCompletionSource`1 retry, DbConnectionOptions userOptions) at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry) at System.Data.SqlClient.SqlConnection.Open() at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.b__36(DbConnection t, DbConnectionInterceptionContext c) at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext](TTarget target, Action`2 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed) at System.Data.Entity.Infrastructure.Interception.DbConnectionDispatcher.Open(DbConnection connection, DbInterceptionContext interceptionContext) at System.Data.Entity.SqlServer.SqlProviderServices.c__DisplayClass33.b__32() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.c__DisplayClass1.b__0() at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute[TResult](Func`1 operation) at System.Data.Entity.SqlServer.DefaultSqlExecutionStrategy.Execute(Action operation) at System.Data.Entity.SqlServer.SqlProviderServices.UsingConnection(DbConnection sqlConnection, Action`1 act) at System.Data.Entity.SqlServer.SqlProviderServices.UsingMasterConnection(DbConnection sqlConnection, Action`1 act) at System.Data.Entity.SqlServer.SqlProviderServices.CreateDatabaseFromScript(Nullable`1 commandTimeout, DbConnection sqlConnection, String createDatabaseScript) at System.Data.Entity.SqlServer.SqlProviderServices.DbCreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) at System.Data.Entity.Core.Common.DbProviderServices.CreateDatabase(DbConnection connection, Nullable`1 commandTimeout, StoreItemCollection storeItemCollection) at System.Data.Entity.Core.Objects.ObjectContext.CreateDatabase() at System.Data.Entity.Migrations.Utilities.DatabaseCreator.Create(DbConnection connection) at System.Data.Entity.Migrations.DbMigrator.EnsureDatabaseExists(Action mustSucceedToKeepDatabase) at System.Data.Entity.Migrations.DbMigrator.Update(String targetMigration) at System.Data.Entity.Internal.DatabaseCreator.CreateDatabase(InternalContext internalContext, Func`3 createMigrator, ObjectContext objectContext) at System.Data.Entity.Internal.InternalContext.CreateDatabase(ObjectContext objectContext, DatabaseExistenceState existenceState) at System.Data.Entity.Database.Create(DatabaseExistenceState existenceState) at System.Data.Entity.CreateDatabaseIfNotExists`1.InitializeDatabase(TContext context) at System.Data.Entity.Internal.InternalContext.c__DisplayClassf`1.b__e() at System.Data.Entity.Internal.InternalContext.PerformInitializationAction(Action action) at System.Data.Entity.Internal.InternalContext.PerformDatabaseInitialization() at System.Data.Entity.Internal.LazyInternalContext.b__4(InternalContext c) at System.Data.Entity.Internal.RetryAction`1.PerformAction(TInput input) at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabaseAction(Action`1 action) at System.Data.Entity.Internal.LazyInternalContext.InitializeDatabase() at System.Data.Entity.Internal.InternalContext.GetEntitySetAndBaseTypeForType(Type entityType) at System.Data.Entity.Internal.Linq.InternalSet`1.Initialize() at System.Data.Entity.Internal.Linq.InternalSet`1.GetEnumerator() at System.Data.Entity.Infrastructure.DbQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() at WriteArrayOfEmployeeToXml(XmlWriterDelegator , Object , XmlObjectSerializerWriteContext , CollectionDataContract ) at System.Runtime.Serialization.CollectionDataContract.WriteXmlValue(XmlWriterDelegator xmlWriter, Object obj, XmlObjectSerializerWriteContext context) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.WriteDataContractValue(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.XmlObjectSerializerWriteContext.SerializeWithoutXsiType(DataContract dataContract, XmlWriterDelegator xmlWriter, Object obj, RuntimeTypeHandle declaredTypeHandle) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObjectContent(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.InternalWriteObject(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.WriteObjectHandleExceptions(XmlWriterDelegator writer, Object graph, DataContractResolver dataContractResolver) at System.Runtime.Serialization.DataContractSerializer.WriteObject(XmlWriter writer, Object graph) at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStream(Type type, Object value, Stream writeStream, HttpContent content) at System.Net.Http.Formatting.XmlMediaTypeFormatter.WriteToStreamAsync(Type type, Object value, Stream writeStream, HttpContent content, TransportContext transportContext, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.WebHost.HttpControllerHandler.d__1b.MoveNext() An error has occurred. The system cannot find the file specified System.ComponentModel.Win32Exception
Advanced Xamarin Forms [Connecting to Web Services, POST] Part3
39:14
Houssem Dellai
Рет қаралды 29 М.
Plugins for Xamarin Forms
26:17
Houssem Dellai
Рет қаралды 12 М.
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 6 МЛН
Lamborghini vs Smoke 😱
00:38
Topper Guild
Рет қаралды 57 МЛН
How many people are in the changing room? #devil #lilith #funny #shorts
00:39
Quando A Diferença De Altura É Muito Grande 😲😂
00:12
Mari Maria
Рет қаралды 22 МЛН
Microservices with Databases can be challenging...
20:52
Software Developer Diaries
Рет қаралды 102 М.
OAuth 2.0 and OpenID Connect (in plain English)
1:02:17
OktaDev
Рет қаралды 1,8 МЛН
Invoke protected ASP.NET Identity Web Services from Xamarin Forms
22:16
It’s time to move on from Agile Software Development (It's not working)
11:07
Login to ASP.NET Identity from Xamarin Forms
18:36
Houssem Dellai
Рет қаралды 52 М.
Microservices explained - the What, Why and How?
18:30
TechWorld with Nana
Рет қаралды 892 М.
Building Fast and Beautiful apps with Xamarin.Forms - Michael Ridland
58:25
Validate User Input (email) in Xamarin Forms
16:42
Houssem Dellai
Рет қаралды 27 М.
Xamarin.Forms: Search Page
21:27
Houssem Dellai
Рет қаралды 25 М.
Deadpool family by Tsuriki Show
00:12
Tsuriki Show
Рет қаралды 6 МЛН