Click here to Skip to main content
15,849,907 members
Home / Discussions / Mobile
   

Mobile

 
AnswerRe: Question about copyright laws Pin
abayomicharm24-Oct-18 20:44
abayomicharm24-Oct-18 20:44 
AnswerRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 2:10
professionalEddy Vluggen25-Oct-18 2:10 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 7:42
ericbruhaha25-Oct-18 7:42 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 8:48
professionalEddy Vluggen25-Oct-18 8:48 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 9:05
ericbruhaha25-Oct-18 9:05 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 9:11
professionalEddy Vluggen25-Oct-18 9:11 
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
professionalAfzaal 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
Member 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
mveRichard MacCutchan18-Sep-18 22:34 
QuestionXamarin Forms UWP Deployment Issue Pin
Kevin Marois24-Jul-18 7:06
professionalKevin Marois24-Jul-18 7:06 
QuestionIntegration of cryptocurrency price checker in web page Pin
Member 138173168-May-18 5:12
Member 138173168-May-18 5:12 
AnswerRe: Integration of cryptocurrency price checker in web page Pin
Codesavage8-May-18 23:35
Codesavage8-May-18 23:35 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Member 138173169-May-18 1:24
Member 138173169-May-18 1:24 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Codesavage10-May-18 1:53
Codesavage10-May-18 1:53 
GeneralRe: Integration of cryptocurrency price checker in web page Pin
Garold Orton12-Oct-18 7:08
Garold Orton12-Oct-18 7:08 
QuestionMessage Removed Pin
25-Mar-18 5:37
Member 1374560625-Mar-18 5:37 
QuestionWhat JDK file do i download to install netbeans8.2? Pin
Member 1373707620-Mar-18 9:58
Member 1373707620-Mar-18 9:58 
AnswerRe: What JDK file do i download to install netbeans8.2? Pin
Afzaal Ahmad Zeeshan5-May-18 3:28
professionalAfzaal Ahmad Zeeshan5-May-18 3:28 
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
Member 1363985423-Jan-18 16:08 
Questionwhy google give NOT Friendly Mobile error? Pin
hamidrezaolat14-Aug-17 22:32
hamidrezaolat14-Aug-17 22:32 
AnswerRe: why google give NOT Friendly Mobile error? Pin
OriginalGriff14-Aug-17 22:35
mveOriginalGriff14-Aug-17 22:35 
GeneralRe: why google give NOT Friendly Mobile error? Pin
Garold Orton12-Oct-18 7:24
Garold Orton12-Oct-18 7:24 

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.