Android.App.Service.StopSelfResult Method
Stop the service if the most recent time it was started was startId.

Syntax

[Android.Runtime.Register("stopSelfResult", "(I)Z", "")]
public bool StopSelfResult (int startId)

See Also

Service.StopSelf

Parameters

startId
The most recent start identifier received in Service.OnStart(Android.Content.Intent, System.Int32).

Returns

Documentation for this section has not yet been entered.

Remarks

Stop the service if the most recent time it was started was startId. This is the same as calling Android.Content.Context.StopService(Android.Content.Intent) for this particular service but allows you to safely avoid stopping if there is a start request from a client that you haven't yet seen in Service.OnStart(Android.Content.Intent, System.Int32).

Be careful about ordering of your calls to this function.. If you call this function with the most-recently received ID before you have called it for previously received IDs, the service will be immediately stopped anyway. If you may end up processing IDs out of order (such as by dispatching them on separate threads), then you are responsible for stopping them in the same order you received them.

[Android Documentation]

Requirements

Namespace: Android.App
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1