Android.App.StartCommandResult.NotSticky Field

Service.OnStartCommand(Android.Content.Intent, Android.App.StartCommandFlags, Android.App.StartCommandFlags) Service.OnStartCommand(Android.Content.Intent, Android.App.StartCommandFlags, Android.App.StartCommandFlags) Android.Content.Context.StartService(Android.Content.Intent) Service.OnStartCommand(Android.Content.Intent, Android.App.StartCommandFlags, Android.App.StartCommandFlags)

This mode makes sense for things that want to do some work as a result of being started, but can be stopped when under memory pressure and will explicit start themselves again later to do more work. An example of such a service would be one that polls for data from a server: it could schedule an alarm to poll every N minutes by having the alarm start its service. When its Service.OnStartCommand(Android.Content.Intent, Android.App.StartCommandFlags, Android.App.StartCommandFlags) is called from the alarm, it schedules a new alarm for N minutes later, and spawns a thread to do its networking. If its process is killed while doing that check, the service will not be restarted until the alarm goes off.

Syntax

StartCommandResult NotSticky

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0