Background service confusion
<p>I'm trying to find out how to keep an Android service running after the starting app is closed. I've tried looking at samples for background services (e.g <a href="https://visualstudiomagazine.com/Articles/2012/07/10/Background-Services-in-Mono-for-Android.aspx" rel="nofollow">this</a> one, and some on the Xamarin site) but in every case the service stops running if the minimised app is 'swiped' off the screen. I don't want the service to accidently stop like this, it should run continually until a confirmed stop is requested. The service does not consume much in the way of resources, just gets a GPS location and posts it to a website every 2 minutes.</p>

<p>By way of background, I am a newbie to Xamarin/Android, but have in the past created several successful services in Windows with C#</p>

<p>(<strong>Later</strong>)
One sample I tried did leave an item in the Settings list of running apps, but didn't actually perform any service tasks once swiped off the screen. Additionally there  was no icon in the status bar. After doing some reading it seems that my androidmanifest file is missing a 'service' attribute (although none of the samples I tried have this); what I have now tried is this</p>

<pre><code>    &lt;service
      android:name=".LocationService"
      android:icon="@drawable/icon"
      android:label="@string/service_name"
    &gt;
    &lt;intent-filter&gt;
      &lt;action android:name="android.service.LocationService" /&gt;
      &lt;category android:name="android.intent.category.DEFAULT" /&gt;
    &lt;/intent-filter&gt;
    &lt;/service&gt;
</code></pre>

<p>...but still no luck. </p>