i have a ListView that is defined in a Xamarin Form. i want this ListView to be updated with the Data from the DB every 5 seconds. In a Non Mobile environment , we have a Windows Service , which is a long running Service. but now i search i came across a Service. but now i see this is implemented differently on each platform. Most examples i get are examples where one is binding the Control in Android Project. WhatUp if my Data binding is done in Xamarin Form (Standard Class) .
1) Can i kindly have the example link or code that refresh any control from a Service that runs in Intervals
2) Update the control that is hosting in a PLC or Standard Class
Spoted in Daniweb-- Sorry to rant. I hate websites. They are just wierd. They don't behave like normal code.
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.
This is my first ever attempt at Xamarin Forms. I followed this Quick Start
When I run it i get the error
DEP3321: To deploy this application, your deployment target should be running Windows Universal Runtime version 10.0.16299.0 or higher. You currently are running version 10.0.15063.1155. Please update your OS, or change your deployment target to a device with the appropriate version.
I found this SO post about this very error. When I try the fixes it produces a bunch of compatibility errors.
When I open the project's Properties the Targeting area shows:
Target: Universal Windows
Target Version: Windows 10 Fall Creators Update (10.0; Build 16299)
Min Version: Windows 10 Fall Creators Update (10.0; Build 16299)
I am developing on Windows 10 Enterprise Version 1703 (OS Build 15063.1155)
I'm pretty clueless here. I've been Googling this but the answers seem to involve updating the OS
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
Hey! The website already exists or you will create it, and do you have any examples of what kind of price checker you would like to integrate, because I have created an web version of crypto tracking app
I've tried downloading jdk-8u161-windows-x64 and jdk-8u162-windows-x64 and they dont pop up in my folders when i browse for files to insert, i have an asus notebook could i ave possibly downloaded the wrong bit for the program or have i downloaded the wrong file all together? Please help, -Rookie
It does not depend upon the manufacturer of your machine, rather the architecture they have manufactured. On Windows machine, go to PC properties, and check what OS you have. If it says something like, x64, then you have it right otherwise consider the 32-bit version of the JDK.
Remember, — apart from the pain that Java programming causes — the most painful part of Java development is being told that JDK is not found. The main issue of this is that you might have not set the JAVA_HOME environment variable, you need to have that set in order to allow your Java programs to run successfully.
Apart from these, I do not see any reason what might cause NetBeans to not start and cause an issue with your, or due to you JDK. If this does not resolve the problem please share the error message you get.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
Does anyone know of an app that can read a QR code and can access the device's unique ID (either phone number, mac address, or...).
On the other hand, I suppose I could use a cookie (that expires after 24 hours or something like that) to identify a device...
".45 ACP - because shooting twice is just silly" - JSOP, 2010 - You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 - When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
I've let your message through, but deleted the link as it looks very much like site driving spam, which is why it was sent to moderation in the first place.
Given how long you have been here, I don't think it was deliberate but please do not link to your site again or the more trigger happy among us will start the process of banning you from this site.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!