2

After a lot of research on Google, I cannot find a proper guide on how to start a mobile app on device boot up in Xamarin Forms.

Basically I have created a mobile application, and I want the app to run in background without user intervention of launching the app.

Could someone advise on how to proceed with this ? Or anyone who has ever done this in Xamarin Forms before ?

Note that the target device is Android and iOS.

Thanks & Regards.

cholo
  • 55
  • 3
  • 10
  • This can't be done on iOS. On Android there are some possibilities you have, but I think the best thing to do here is double-check your requirements and see if there is another way to solve your problem. – Gerald Versluis Nov 06 '17 at 15:35
  • 1
    Hello, I do not think this question should be marked as duplicate. The difference here is I am looking for it to be done in Xamarin forms. On iOS, I agree as of now it is not achievable. – cholo Nov 06 '17 at 15:36
  • You don't do it in Forms. You do it in the Android project, just as described in the duplicate link. – Jason Nov 06 '17 at 15:45
  • @Jason : I agree. But the code should be C#-based – cholo Nov 06 '17 at 15:46
  • https://stackoverflow.com/questions/33935764/how-can-i-make-c-sharp-xamarin-android-app-run-at-phone-start-up – Jason Nov 06 '17 at 15:59
  • Thanks @Jason. How can I achieve this in my PCL ? I want to make use of Dependency service. – cholo Nov 06 '17 at 16:35
  • this is by definition an Android specific function, so just put it in the Android app – Jason Nov 06 '17 at 16:39
  • @Jason : I am bit confused about the code. I have never implemented an android specific function like that. I have an app `DietRunner`. How can I direct this to be launched on device boot-up and keep running in the background? Please help if you could fit this in the link you provided. – cholo Nov 06 '17 at 16:49

0 Answers0