Click here to Skip to main content
15,893,266 members
Home / Discussions / Mobile
   

Mobile

 
Questionmobile program Pin
Member 1408773812-Dec-18 20:07
Member 1408773812-Dec-18 20:07 
Questionreturn all html codes of page instead of one string (by B4A commands) Pin
Member 1352250115-Nov-18 20:38
Member 1352250115-Nov-18 20:38 
QuestionAdvice required Pin
Mycroft Holmes9-Nov-18 17:22
professionalMycroft Holmes9-Nov-18 17:22 
AnswerRe: Advice required Pin
Adrian Mikeliunas20-Nov-18 10:49
Adrian Mikeliunas20-Nov-18 10:49 
GeneralRe: Advice required Pin
Mycroft Holmes20-Nov-18 11:22
professionalMycroft Holmes20-Nov-18 11:22 
QuestionTapGestureRecognizer on an Image on Tab not work Pin
Vimalsoft(Pty) Ltd8-Nov-18 11:34
professionalVimalsoft(Pty) Ltd8-Nov-18 11:34 
Questionprayer time Pin
Sayed Gulab Hussain Shah3-Nov-18 22:30
Sayed Gulab Hussain Shah3-Nov-18 22:30 
AnswerRe: prayer time Pin
OriginalGriff3-Nov-18 22:32
mveOriginalGriff3-Nov-18 22:32 
AnswerRe: prayer time Pin
Afzaal Ahmad Zeeshan4-Nov-18 9:32
professionalAfzaal Ahmad Zeeshan4-Nov-18 9:32 
QuestionQuestion about copyright laws Pin
ericbruhaha23-Oct-18 15:21
ericbruhaha23-Oct-18 15:21 
AnswerRe: Question about copyright laws Pin
Richard MacCutchan23-Oct-18 22:36
mveRichard MacCutchan23-Oct-18 22:36 
AnswerRe: Question about copyright laws Pin
abayomicharm24-Oct-18 19:44
abayomicharm24-Oct-18 19:44 
AnswerRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 1:10
professionalEddy Vluggen25-Oct-18 1:10 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 6:42
ericbruhaha25-Oct-18 6:42 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 7:48
professionalEddy Vluggen25-Oct-18 7:48 
GeneralRe: Question about copyright laws Pin
ericbruhaha25-Oct-18 8:05
ericbruhaha25-Oct-18 8:05 
GeneralRe: Question about copyright laws Pin
Eddy Vluggen25-Oct-18 8:11
professionalEddy Vluggen25-Oct-18 8:11 
QuestionUpdating a ListView from a Service Every 5 seconds Pin
Vimalsoft(Pty) Ltd15-Oct-18 0:32
professionalVimalsoft(Pty) Ltd15-Oct-18 0:32 
AnswerRe: Updating a ListView from a Service Every 5 seconds Pin
Afzaal Ahmad Zeeshan24-Oct-18 0:38
professionalAfzaal Ahmad Zeeshan24-Oct-18 0: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 11:46
professionalVimalsoft(Pty) Ltd27-Oct-18 11:46 
QuestionHow to send data from websql to server mysql using ajax php Pin
Member 1290096918-Sep-18 20:03
Member 1290096918-Sep-18 20:03 
AnswerRe: How to send data from websql to server mysql using ajax php Pin
Richard MacCutchan18-Sep-18 21:34
mveRichard MacCutchan18-Sep-18 21:34 
QuestionXamarin Forms UWP Deployment Issue Pin
Kevin Marois24-Jul-18 6:06
professionalKevin Marois24-Jul-18 6:06 
QuestionIntegration of cryptocurrency price checker in web page Pin
Member 138173168-May-18 4:12
Member 138173168-May-18 4:12 
AnswerRe: Integration of cryptocurrency price checker in web page Pin
Codesavage8-May-18 22:35
Codesavage8-May-18 22:35 

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.