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

Concluído
Publicado há quase 4 anos

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 do Projeto: 26365193

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 4 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
Concedido a:
Avatar do Usuário
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 em 20 dias
5,0 (7 avaliações)
4,3
4,3
3 freelancers estão ofertando em média £36 GBP/hora for esse trabalho
Avatar do Usuário
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 em 30 dias
5,0 (11 avaliações)
6,1
6,1

Sobre o cliente

Bandeira do(a) UNITED KINGDOM
Harwich, United Kingdom
5,0
12
Método de pagamento verificado
Membro desde out. 4, 2014

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.