Xamarin Android Tutorial - Fetch JSON from API with Refit and display on ListView

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ต.ค. 2024

ความคิดเห็น • 62

  • @anonimuspunk
    @anonimuspunk 5 ปีที่แล้ว +3

    Great, i missed this series of tutorials with xamarin. I hope more. Regards

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      ^^ I'll be back with Xamarin Android :D

  • @elchinibrahimli1870
    @elchinibrahimli1870 5 ปีที่แล้ว +1

    Thanks friend, it made as yours it worked. Is it same codes if we want to pass parameters or use REST API?

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Sure my dear :D

  • @feubervbnddejwfb2637
    @feubervbnddejwfb2637 5 ปีที่แล้ว +1

    great!!! thanks for doing more xamarin android videos

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      You're welcome my dear :D I will try

  • @nevermind4459
    @nevermind4459 5 ปีที่แล้ว +1

    thank y for your tutorial, its really helpful,,, i have only one issue, EDMTDialog not working in my application. could you please help me out.

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Hi , try create an new project and install only EDMTDialog , let me known if you still have this problem

    • @nevermind4459
      @nevermind4459 5 ปีที่แล้ว

      @@eddydn71 thank you v much for your reply,,, yes I've only used EDMTDialog in my project without Refit.
      I think the issue in my project is that i'm using WebClient class to get json data which isn't support async and awit methods,, I dont know how to overcome this issue

  • @adammizam7716
    @adammizam7716 4 ปีที่แล้ว +1

    Hai @EDMT , i have a few question. Sorry i'm newbie in programming and xamarin world. May i know how to appear the data from the api without click the "Get Data" button

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว +1

      Copy all code of GetData button and paste on onCreate() method if you want it load automatically

    • @adammizam7716
      @adammizam7716 4 ปีที่แล้ว +1

      @@eddydn71 sure I will try it.. thanks

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว

      You're welcome my bro

  • @conradwawire
    @conradwawire 5 ปีที่แล้ว +1

    good tutorials you are the best

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      You're welcome my dear :D

  • @alktab8993
    @alktab8993 5 ปีที่แล้ว +2

    Thank

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      You're welcome my dear

  • @MOAli-uj1zc
    @MOAli-uj1zc 5 ปีที่แล้ว +1

    I seem to be getting a "API doesn't look like a Refit interface" error where you declare the url for the rest service on the main activity even though I have followed all your steps. Any suggestions for this?

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Try watch my tutorial step by step my dear :D

  • @rezaghahremani7340
    @rezaghahremani7340 5 ปีที่แล้ว +1

    Hi Teacher,i have a so important question. I want some video to learn security in android app. How can i release an app that is secure?

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      What you want to secure ? from decompiler ?

  • @prudX
    @prudX 5 ปีที่แล้ว

    Thank you for tutorial, however I have problem when trying to use refit for JSON data that is not inside array "[ ]" like the test data from json place holder. Do you have any suggestions?
    I get the following error :
    Cannot deserialize the current JSON object (e.g. {"name":"value"}) into type System.Collections.Generic.List 1[App1.Model.RootObject] because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly. To fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer.)

    • @prudX
      @prudX 5 ปีที่แล้ว

      I did find some stackoverflow answers however I didn't understand them

    • @prudX
      @prudX 5 ปีที่แล้ว +1

      I figured it out, nevermind!
      I just read it in as the root object instead of a list of a root object, silly me

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      You're welcome my dear

  • @spacefish4370
    @spacefish4370 4 ปีที่แล้ว +1

    Can you please explain the purpose of the Interface class a bit? It is the only piece of this that I don't quite understand.

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว +1

      We declare interface because Refit need it ! And it will implement it in build-in function

  • @vishvajeet7625
    @vishvajeet7625 5 ปีที่แล้ว +2

    Hey bro can you please tell me a way to make background services run even when app is closed

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว +3

      Services is run when app close my dear :D I will show how to do that :D

    • @SalmoMascarenhas
      @SalmoMascarenhas 5 ปีที่แล้ว

      You can learn a little about this subject here:docs.microsoft.com/pt-br/xamarin/android/app-fundamentals/services/index

  • @carlvincentpogi5261
    @carlvincentpogi5261 3 ปีที่แล้ว

    does this work between MS SQL Server, ASP .NET WebAPI ? for xamarin android

    • @eddydn71
      @eddydn71  3 ปีที่แล้ว

      Yes my bro :D

    • @carlvincentpogi5261
      @carlvincentpogi5261 3 ปีที่แล้ว

      does RestServices supports XML Data ? or just json?

  • @heniek6715
    @heniek6715 4 ปีที่แล้ว +1

    i got a problem that says cannot convert from Xamarinrefit.list to int in line 53 can u helt me

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว

      Please watch my tutorial step by step , my dear

  • @genesisbriones2413
    @genesisbriones2413 5 ปีที่แล้ว +1

    Sir, can you please make a tutorial like this using Android Studio (Java)

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Already do this , just search my dear :D

  • @vusalsuleymanov9147
    @vusalsuleymanov9147 5 ปีที่แล้ว +1

    bro i have some problems with emulator. My processor is amd and ram 4 gb. How can i solve the problem?
    16:26 Emulator: This application has requested the Runtime to terminate it in an unusual way.
    16:26 Emulator: Please contact the application's support team for more information.
    16:26 ADB rejected shell command (getprop): closed
    16:26 Emulator: Process finished with exit code 255

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      I found some resources , i hope it helpful : support.microsoft.com/en-gb/help/884538/you-receive-a-this-application-has-requested-the-runtime-to-terminate

  • @abdulmalikalolofi8582
    @abdulmalikalolofi8582 5 ปีที่แล้ว +1

    how to make load more data from Json , load first 0 to 10 records and 10 to 20 can u do it bro

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Yes you can do that if you have an API endpoint accept you load json by index :D

  • @izzylutions
    @izzylutions 4 ปีที่แล้ว +1

    why my EDMT dialog doesnt appear on adroid app ?

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว +1

      Have you called show() method of dialog ?

    • @izzylutions
      @izzylutions 4 ปีที่แล้ว +1

      @@eddydn71 yup , i have done it . But the result still the same 😢. Btw , the adapter is okay 👍🏻

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว +1

      @@izzylutions Dialog, dialog not show that mean we don't call show() method or call in wrong place
      Try test: Create an button and add dialog.show() in button. Click button if you see dialog, check your code in adapter again

  • @genesisbriones2413
    @genesisbriones2413 5 ปีที่แล้ว +1

    i have a json that contains name, password, contact, address..... how can i show it ,,, like a table view.... Thank you very much

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Convert it to Object and access like class of java my dear

    • @genesisbriones2413
      @genesisbriones2413 5 ปีที่แล้ว +1

      @@eddydn71 any reference Sir.

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      Use Newtonsoft.Json to do that my dear , try google 'Convert json to object with Newtonsoft"

    • @genesisbriones2413
      @genesisbriones2413 5 ปีที่แล้ว

      @@eddydn71 Please do tutorial of newtonsoft...

  • @UbergonMX
    @UbergonMX 5 ปีที่แล้ว +2

    holee sheet a xamarin tutorial atlast!!

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      ^^ You're welcome my dear :D

  • @TheGiuseppegdp
    @TheGiuseppegdp 4 ปีที่แล้ว +1

    Doesn't works on iOS. Why?

    • @eddydn71
      @eddydn71  4 ปีที่แล้ว

      Because this tutorial only design for 'Xamarin Android' , not 'Xamarin Form' :)

  • @noone-eo2wx
    @noone-eo2wx 2 ปีที่แล้ว

    i tried but get application stopped

  • @sapnasolanki29
    @sapnasolanki29 5 ปีที่แล้ว +1

    I am getting error in interface at GetUser();

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      show me full of your error , my dear :D

    • @sapnasolanki29
      @sapnasolanki29 5 ปีที่แล้ว

      @@eddydn71 now its gaone

    • @sapnasolanki29
      @sapnasolanki29 5 ปีที่แล้ว +1

      @@eddydn71 i have another error in find view by id, list view(resource) is not defined in layout but i have defined it in layout still not recognizing

    • @eddydn71
      @eddydn71  5 ปีที่แล้ว

      @@sapnasolanki29 Try clean and rebuild your project , my dear