-1

I want yo make a task which complete running after Quit the app. Like complete Downloading Task. I don't find active way or method for Xamarin form mobile app. Any Help?

2 Answers2

0

All You Want to Do is You Want your Task Run in Background so Even if you Quit the App the Task continues to Run is it okie ?

This Type of Task Are Known As Services(Back ground Tasks,or Background Services) in .net And Xamarin PlatForms I Think You will Find This link Helpfull See this : enter link description here

in this Way if you are running Some Downoading Task then it will not be killed After App is Getting quit or onSleep and will keep running in Back Ground Until Its Completed Or Any Error Generate ..

  • 1
    i want it to complete after the user make clear all on his phone – Jaafar Dhainy Jan 09 '23 at 13:19
  • You can try Calling the service in OnDistroy() Method of MainActivity Also.. OnDistroy() Called when App is quit And Onsleep() is called when you press home button and app goes to Background in your recent Tasks.. – Maharshi Acharya Jan 09 '23 at 13:32
0

First, if you want to make the app still be running after quitting, It can not be realized.

Second, if you want to make the app quit after finishing the task you can refer to the How to terminate a Xamarin application?

Guangyu Bai - MSFT
  • 2,555
  • 1
  • 2
  • 8