Find Jobs
Hire Freelancers

xamarin update label and progress bars been killed by change to a different activity (need a fix)

min £36 GBP / hour

Opravljeno
Objavljeno pred skoraj 4 leti

min £36 GBP / hour

We have a very simple app which reads data over a Bluetooth connection and updates a text string on a page. All the updates work as normal via the timer, but when we switch to a different page in the app and return to the home page, the updates stop working. We can set a break point on the text string update and we can see the new value but it does not update. Why when we change to a different page and returns does it's stops the updates? It's a simple label and it's been updated in the UI? I would like to understand how to fix this problem using System; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; using [login to view URL]; namespace Custom_TestAppHarness { [XamlCompilation([login to view URL])] public partial class Homepage : ContentPage, INotifyPropertyChanged { public Homepage() { InitializeComponent(); // Start timer to update all the information on the home activity if (App._timeerhasstarted == false) { App._timeerhasstarted = true; [login to view URL]([login to view URL](5), () => { [login to view URL](() => { testcall(); }); return true; //use this to run continuously }); } } void testcall() { [login to view URL](async () => { [login to view URL] = [login to view URL](); [login to view URL] = App._vehiclefuellevel; [login to view URL] = App._vehiclebatterylevel; }); } protected override void OnAppearing() { [login to view URL](); [login to view URL] = [login to view URL](); } } } XML code for the label <Label x:Name = "BTTextStatus" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="6" HorizontalOptions="CenterAndExpand" VerticalOptions="CenterAndExpand" TextColor="#cccccc" FontSize="Medium"/>
ID projekta: 26365193

Več o projektu

3 ponudb
Projekt na daljavo
Aktivno pred 4 leti

Želite zaslužiti?

Prednosti oddajanja ponudb na Freelancerju

Nastavite svoj proračun in časovni okvir
Prejmite plačilo za svoje delo
Povzetek predloga
Registracija in oddajanje ponudb sta brezplačna
Dodeljeno:
Avatar uporabnika
Hi, I can solve your problem, it's kind of you update your label on main thread and when you navigate to another page the new page push into the stack and so it obviously not update the label. I have the solution. Let's introduce myself - I have 4+ years of experience in Xamarin and developed 10+ app. I checked your code and now I am trying to solve your problem. So if you are interested you can contact me. Thanks
£36 GBP v 20 dneh
5,0 (7 ocen)
4,3
4,3
3 freelancerjev je oddalo ponudbo s povprečno vrednostjo £36 GBP/uro za to delo
Avatar uporabnika
I have 7+ years of experience working with Xamarin platform and delevered around 20+ CrossPlatform Mobile apps so far. I can look into this issue and fix it. It looks like a Timer issue. I would say it is not a good practice to use a Timer to perform such type of task. There are better alternatives to perform such implementation which I can apply after looking into your code and your implementation in App.xaml.cs. Looking forward to hear from you. Thanks.
£36 GBP v 30 dneh
5,0 (11 ocen)
6,1
6,1

O stranki

Zastava UNITED KINGDOM
Harwich, United Kingdom
5,0
12
Plačilna metoda je verificirana
Član(ica) od okt. 4, 2014

Verifikacija stranke

Hvala! Po e-pošti smo vam poslali povezavo za prevzem brezplačnega dobropisa.
Pri pošiljanju vašega e-sporočila je šlo nekaj narobe. Poskusite znova.
Registrirani uporabniki Skupaj objavljenih del
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Nalaganje predogleda
Geolociranje je bilo dovoljeno.
Vaša prijavna seja je potekla, zato ste bili odjavljeni. Prosimo, da se znova prijavite.