Show / Hide Table of Contents

    Class AndroidSensusService

    Android sensus service. This is a hybrid service, as it is started by the Sensus activity to run indefinitely, and the activity also binds to it. This service runs in the foreground. For now, no components other than the Sensus activity can interact with the service, as the service is not exported.

    Inheritance
    System.Object
    AndroidSensusService
    Namespace: Sensus.Android
    Assembly: SensusAndroid.dll
    Syntax
    public class AndroidSensusService : Service

    Constructors

    AndroidSensusService()

    Declaration
    public AndroidSensusService()

    Fields

    KEY_STOP_SERVICE_IF_NO_PROTOCOLS_SHOULD_RUN

    Declaration
    public const string KEY_STOP_SERVICE_IF_NO_PROTOCOLS_SHOULD_RUN = "STOP-SERVICE-IF-NO-PROTOCOLS-SHOULD-RUN"
    Field Value
    Type Description
    System.String

    Methods

    GetServiceIntent(Boolean)

    Gets the service intent.

    Declaration
    public static Intent GetServiceIntent(bool stopServiceIfNoProtocolsShouldRun)
    Parameters
    Type Name Description
    System.Boolean stopServiceIfNoProtocolsShouldRun

    If set to true, then add an intent extra indicating that the AndroidSensusService should stop itself immediately if no Protocol should run.

    Returns
    Type Description
    Android.Content.Intent

    The service intent.

    OnBind(Intent)

    Declaration
    public override IBinder OnBind(Intent intent)
    Parameters
    Type Name Description
    Android.Content.Intent intent
    Returns
    Type Description
    Android.OS.IBinder

    OnCreate()

    Declaration
    public override void OnCreate()

    OnDestroy()

    Declaration
    public override void OnDestroy()

    OnStartCommand(Intent, StartCommandFlags, Int32)

    Declaration
    public override StartCommandResult OnStartCommand(Intent intent, StartCommandFlags flags, int startId)
    Parameters
    Type Name Description
    Android.Content.Intent intent
    Android.App.StartCommandFlags flags
    System.Int32 startId
    Returns
    Type Description
    Android.App.StartCommandResult

    Start(Boolean)

    Starts the service.

    Declaration
    public static void Start(bool stopServiceIfNoProtocolsShouldRun)
    Parameters
    Type Name Description
    System.Boolean stopServiceIfNoProtocolsShouldRun

    If set to true, then add an intent extra indicating that the AndroidSensusService should stop itself immediately if no Protocol should run.

    Stop()

    Declaration
    public void Stop()
    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX