Click here to Skip to main content
14,365,177 members
   

Mobile

 
AnswerRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 2:10
mveEddy Vluggen25-Oct-18 2:10 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 7:42
memberericbruhaha25-Oct-18 7:42 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 8:48
mveEddy Vluggen25-Oct-18 8:48 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 9:05
memberericbruhaha25-Oct-18 9:05 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 9:11
mveEddy Vluggen25-Oct-18 9:11 
AnswerMessage Closed Pin
20-Nov-18 11:52
memberAdrian Mikeliunas20-Nov-18 11:52 
QuestionUpdating a ListView from a Service Every 5 seconds Pin
Vimalsoft(Pty) Ltd15-Oct-18 1:32
professionalVimalsoft(Pty) Ltd15-Oct-18 1:32 
AnswerRe: Updating a ListView from a Service Every 5 seconds Pin
Afzaal Ahmad Zeeshan24-Oct-18 1:38
mveAfzaal Ahmad Zeeshan24-Oct-18 1:38 
Service itself is a concept that is tied to Android platform, you will not find the same concept (check how Services run, and on which thread), and every platform (iOS, Windows) has its own implementation and best practices for a Service, that is why Xamarin.Forms itself does not have any such library or object. You can however always create your own service that utilize thread pool threads, and runs a job at an interval.

Now what you want is a service that services for data, and displays it in the ListView. This has 2 parts, one is the background service that retrieves the data from Windows Service (might it be an API or something that you have!) and the other part is that feeds the data to the UI. This can be solved, if you write a service component, that reads the data inside the Page. This way your Page will have the data that needs to be shown. Now, the last phase of displaying the data can be done using ObservableCollection<T>, this will automatically map the elements to your ListView. See this for an example of how this can be done, ListView Data Sources - Xamarin | Microsoft Docs

So, to wrap, you need to create a (most likely DI based) Service, that will create either a platform dependant or Xamarin.Forms dependant service, and that service should return the data to your Page (an asynchronous API will help even better, enabling your page to refresh only when the data is available without the need of setting a timer and checking for updates), and then lastly bind the data to the page.

How to add background service in Xamarin forms — Xamarin Community Forums
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~

GeneralRe: Updating a ListView from a Service Every 5 seconds Pin
Vimalsoft(Pty) Ltd27-Oct-18 12:46
professionalVimalsoft(Pty) Ltd27-Oct-18 12:46 
QuestionHow to send data from websql to server mysql using ajax php Pin
Member 1290096918-Sep-18 21:03
memberMember 1290096918-Sep-18 21:03 
AnswerRe: How to send data from websql to server mysql using ajax php Pin
Richard MacCutchan18-Sep-18 22:34
protectorRichard MacCutchan18-Sep-18 22:34 
AnswerMessage Closed Pin
21-Oct-18 23:38
memberMember 1402786821-Oct-18 23:38 
QuestionXamarin Forms UWP Deployment Issue Pin
Kevin Marois24-Jul-18 7:06
professionalKevin Marois24-Jul-18 7:06 
AnswerMessage Closed Pin
26-Jul-18 22:02
membernazneen shaikh26-Jul-18 22:02 
QuestionIntegration of cryptocurrency price checker in web page Pin
Member 138173168-May-18 5:12
memberMember 138173168-May-18 5:12 
AnswerRe: Integration of cryptocurrency price checker in web page Pin
Codesavage8-May-18 23:35
memberCodesavage8-May-18 23:35 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Member 138173169-May-18 1:24
memberMember 138173169-May-18 1:24 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Codesavage10-May-18 1:53
memberCodesavage10-May-18 1:53 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Garold Orton12-Oct-18 7:08
memberGarold Orton12-Oct-18 7:08 
QuestionWhat JDK file do i download to install netbeans8.2? Pin
Member 1373707620-Mar-18 9:58
memberMember 1373707620-Mar-18 9:58 
AnswerRe: What JDK file do i download to install netbeans8.2? Pin
Afzaal Ahmad Zeeshan5-May-18 3:28
mveAfzaal Ahmad Zeeshan5-May-18 3:28 
AnswerMessage Closed Pin
23-Jul-18 11:17
memberMember 1392328723-Jul-18 11:17 
QuestionBefore I develop a mobile app Pin
#realJSOP11-Oct-17 7:59
mve#realJSOP11-Oct-17 7:59 
AnswerRe: Before I develop a mobile app Pin
Member 1363985423-Jan-18 16:08
memberMember 1363985423-Jan-18 16:08 
AnswerMessage Closed Pin
2-Feb-18 10:12
memberApk Mirror App2-Feb-18 10:12 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.