Run the methods in background which are in ViewModels in Xamarin.ios

JayluJaylu INMember ✭✭

Hi All,

I am working on Xamarin.iOS application. I want some part of my currently running features should also run in background. I have a System.Timer which is in the App.cs(Load on start) and added TimerElapsed event in one of the viewcontroller through which control passes to ViewModel on timer elapsed and executes all function.

Now I want the same feature should run in background also but unable to get thoughts how to achieve it. Can anyone help me on this?

Thanks.

Tagged:

Answers

  • ColeXColeX Member, Xamarin Team Xamurai

    You can get max 10 minutes to do all the work if you enable background mode.

    Background Modes Tutorial: Getting Started

  • JayluJaylu INMember ✭✭

    10 minutes? I want this code to run for a particular timeframe I mean, like until timer stops.

  • JayluJaylu INMember ✭✭

    It seems StackOverflow is more supportive forum than Xamarin forums itself. I thought since this is official Xamarin forum I would get better support for my problem but it's wrong. Still I am stuck at the above discussion but no response from Xamarin.

  • JohnHJohnH GBMember ✭✭✭✭✭

    @Jaylu said:
    It seems StackOverflow is more supportive forum than Xamarin forums itself. I thought since this is official Xamarin forum I would get better support for my problem but it's wrong. Still I am stuck at the above discussion but no response from Xamarin.

    You mean, no response from Xamarin other than ColeX above?

  • JayluJaylu INMember ✭✭
    edited June 2018

    Yes John, no other response.

  • JohnHJohnH GBMember ✭✭✭✭✭

    @Jaylu said:
    Yes John, no other response.

    And the link he provided, which shows how background tasks work in iOS, doesn't help you?

Sign In or Register to comment.