Show / Hide Table of Contents

    Class AndroidSensusServiceHelper

    Inheritance
    System.Object
    SensusServiceHelper
    AndroidSensusServiceHelper
    Implements
    ISensusServiceHelper
    Inherited Members
    SensusServiceHelper.PARTICIPATION_VERIFICATION_TIMEOUT_SECONDS
    SensusServiceHelper.APP_CENTER_KEY_ANDROID
    SensusServiceHelper.APP_CENTER_KEY_IOS
    SensusServiceHelper.ENCRYPTION_KEY
    SensusServiceHelper.BUILD_ID
    SensusServiceHelper.SHARE_DIRECTORY
    SensusServiceHelper.HEALTH_TEST_DELAY
    SensusServiceHelper.JSON_SERIALIZER_SETTINGS
    SensusServiceHelper.Initialize(Func<SensusServiceHelper>)
    SensusServiceHelper.Get()
    SensusServiceHelper.ReadAllBytes(String)
    SensusServiceHelper.GetDirectorySizeMB(String)
    SensusServiceHelper.GetFileSizeMB(String[])
    SensusServiceHelper.ClearSingleton()
    SensusServiceHelper.GetHash(String)
    SensusServiceHelper.AddRunningProtocolIdAsync(String)
    SensusServiceHelper.RemoveRunningProtocolIdAsync(String)
    SensusServiceHelper.GetRunningProtocols()
    SensusServiceHelper.SaveAsync()
    SensusServiceHelper.StartAsync()
    SensusServiceHelper.RegisterProtocol(Protocol)
    SensusServiceHelper.AddScriptAsync(Script, RunMode)
    SensusServiceHelper.RemoveScriptsForRunner(ScriptRunner)
    SensusServiceHelper.RemoveExpiredScriptsAsync()
    SensusServiceHelper.ClearScriptsAsync()
    SensusServiceHelper.IssuePendingSurveysNotificationAsync(PendingSurveyNotificationMode, Protocol)
    SensusServiceHelper.CancelPendingSurveysNotification()
    SensusServiceHelper.FlashNotificationAsync(String)
    SensusServiceHelper.ScanQrCodeAsync(String)
    SensusServiceHelper.PromptForAndReadTextFileAsync()
    SensusServiceHelper.PromptForInputAsync(String, Input, Nullable<CancellationToken>, Boolean, String, String, String, String, Boolean)
    SensusServiceHelper.PromptForInputsAsync(String, IEnumerable<Input>, Nullable<CancellationToken>, Boolean, String, String, String, String, Boolean)
    SensusServiceHelper.PromptForInputsAsync(Nullable<DateTimeOffset>, IEnumerable<InputGroup>, Nullable<CancellationToken>, Boolean, String, String, String, String, Boolean, Action)
    SensusServiceHelper.GetPositionsFromMapAsync(Position, String, Action<List<Position>>)
    SensusServiceHelper.GetPositionsFromMapAsync(String, String, Action<List<Position>>)
    SensusServiceHelper.UnregisterProtocolAsync(Protocol)
    SensusServiceHelper.GetSharePath(String)
    SensusServiceHelper.ConvertJsonForCrossPlatform(String)
    SensusServiceHelper.ObtainPermissionAsync(Permission)
    SensusServiceHelper.UpdatePushNotificationRegistrationsAsync(CancellationToken)
    SensusServiceHelper.StopAsync()
    SensusServiceHelper.RemoveScripts(Script[])
    SensusServiceHelper.Logger
    SensusServiceHelper.RegisteredProtocols
    SensusServiceHelper.RunningProtocolIds
    SensusServiceHelper.PointsOfInterest
    SensusServiceHelper.BarcodeWriter
    SensusServiceHelper.FlashNotificationsEnabled
    SensusServiceHelper.ScriptsToRun
    SensusServiceHelper.GpsDesiredAccuracyMeters
    SensusServiceHelper.GpsMinTimeDelayMS
    SensusServiceHelper.GpsMinDistanceDelayMeters
    Namespace: Sensus.Android
    Assembly: SensusAndroid.dll
    Syntax
    public class AndroidSensusServiceHelper : SensusServiceHelper, ISensusServiceHelper

    Constructors

    AndroidSensusServiceHelper()

    Declaration
    public AndroidSensusServiceHelper()

    Properties

    BatteryChargePercent

    Declaration
    public override float BatteryChargePercent { get; }
    Property Value
    Type Description
    System.Single
    Overrides
    SensusServiceHelper.BatteryChargePercent

    DeviceId

    Declaration
    public override string DeviceId { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.DeviceId

    DeviceManufacturer

    Declaration
    public override string DeviceManufacturer { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.DeviceManufacturer

    DeviceModel

    Declaration
    public override string DeviceModel { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.DeviceModel

    IsCharging

    Declaration
    public override bool IsCharging { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SensusServiceHelper.IsCharging

    OperatingSystem

    Declaration
    public override string OperatingSystem { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.OperatingSystem

    PushNotificationToken

    Declaration
    public override string PushNotificationToken { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.PushNotificationToken

    UserDeniedBluetoothEnable

    Declaration
    public bool UserDeniedBluetoothEnable { get; set; }
    Property Value
    Type Description
    System.Boolean

    Version

    Declaration
    public override string Version { get; }
    Property Value
    Type Description
    System.String
    Overrides
    SensusServiceHelper.Version

    WakeLockHeld

    Declaration
    public bool WakeLockHeld { get; }
    Property Value
    Type Description
    System.Boolean

    WakeLockTime

    Declaration
    public TimeSpan WakeLockTime { get; }
    Property Value
    Type Description
    System.TimeSpan

    WiFiConnected

    Declaration
    public override bool WiFiConnected { get; }
    Property Value
    Type Description
    System.Boolean
    Overrides
    SensusServiceHelper.WiFiConnected

    Methods

    DisableBluetoothAsync(Boolean, Boolean, String)

    Declaration
    public override Task<bool> DisableBluetoothAsync(bool reenable, bool lowEnergy = true, string rationale = null)
    Parameters
    Type Name Description
    System.Boolean reenable
    System.Boolean lowEnergy
    System.String rationale
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>
    Overrides
    SensusServiceHelper.DisableBluetoothAsync(Boolean, Boolean, String)

    EnableBluetoothAsync(Boolean, String)

    Enables the Bluetooth adapter, or prompts the user to do so if we cannot do this programmatically.

    Declaration
    public override Task<bool> EnableBluetoothAsync(bool lowEnergy, string rationale)
    Parameters
    Type Name Description
    System.Boolean lowEnergy

    If set to true low energy.

    System.String rationale

    Rationale.

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Boolean>

    true, if Bluetooth was enabled, false otherwise.

    Overrides
    SensusServiceHelper.EnableBluetoothAsync(Boolean, String)

    EnableProbeWhenEnablingAll(Probe)

    Declaration
    public override bool EnableProbeWhenEnablingAll(Probe probe)
    Parameters
    Type Name Description
    Probe probe
    Returns
    Type Description
    System.Boolean
    Overrides
    SensusServiceHelper.EnableProbeWhenEnablingAll(Probe)

    GetQrCodeImageSource(String)

    Declaration
    public override ImageSource GetQrCodeImageSource(string contents)
    Parameters
    Type Name Description
    System.String contents
    Returns
    Type Description
    Xamarin.Forms.ImageSource
    Overrides
    SensusServiceHelper.GetQrCodeImageSource(String)

    GetSensorManager()

    Declaration
    public SensorManager GetSensorManager()
    Returns
    Type Description
    Android.Hardware.SensorManager

    KeepDeviceAwakeAsync()

    Declaration
    public override Task KeepDeviceAwakeAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.KeepDeviceAwakeAsync()

    LetDeviceSleepAsync()

    Declaration
    public override Task LetDeviceSleepAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.LetDeviceSleepAsync()

    ProtectedFlashNotificationAsync(String)

    Declaration
    protected override Task ProtectedFlashNotificationAsync(string message)
    Parameters
    Type Name Description
    System.String message
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.ProtectedFlashNotificationAsync(String)

    RegisterWithNotificationHubAsync(Tuple<String, String>)

    Declaration
    protected override Task RegisterWithNotificationHubAsync(Tuple<string, string> hubSas)
    Parameters
    Type Name Description
    System.Tuple<System.String, System.String> hubSas
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.RegisterWithNotificationHubAsync(Tuple<String, String>)

    RequestNewPushNotificationToken()

    Declaration
    protected override void RequestNewPushNotificationToken()
    Overrides
    SensusServiceHelper.RequestNewPushNotificationToken()

    RunActionUsingMainActivityAsync(Action<AndroidMainActivity>, Boolean, Boolean)

    Runs an action using main activity, optionally bringing the main activity into focus if it is not already focused.

    Declaration
    public Task RunActionUsingMainActivityAsync(Action<AndroidMainActivity> action, bool startMainActivityIfNotFocused, bool holdActionIfNoActivity)
    Parameters
    Type Name Description
    System.Action<AndroidMainActivity> action

    Action to run.

    System.Boolean startMainActivityIfNotFocused

    Whether or not to start the main activity if it is not currently focused.

    System.Boolean holdActionIfNoActivity

    If the main activity is not focused and we're not starting a new one to refocus it, whether or not to hold the action for later when the activity is refocused.

    Returns
    Type Description
    System.Threading.Tasks.Task

    RunVoicePromptAsync(String, Action)

    Declaration
    public override Task<string> RunVoicePromptAsync(string prompt, Action postDisplayCallback)
    Parameters
    Type Name Description
    System.String prompt
    System.Action postDisplayCallback
    Returns
    Type Description
    System.Threading.Tasks.Task<System.String>
    Overrides
    SensusServiceHelper.RunVoicePromptAsync(String, Action)

    SendEmailAsync(String, String, String)

    Declaration
    public override Task SendEmailAsync(string toAddress, string subject, string message)
    Parameters
    Type Name Description
    System.String toAddress
    System.String subject
    System.String message
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.SendEmailAsync(String, String, String)

    SetFocusedMainActivity(AndroidMainActivity)

    Declaration
    public void SetFocusedMainActivity(AndroidMainActivity focusedMainActivity)
    Parameters
    Type Name Description
    AndroidMainActivity focusedMainActivity

    ShareFileAsync(String, String, String)

    Declaration
    public override Task ShareFileAsync(string path, string subject, string mimeType)
    Parameters
    Type Name Description
    System.String path
    System.String subject
    System.String mimeType
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.ShareFileAsync(String, String, String)

    TextToSpeechAsync(String)

    Declaration
    public override Task TextToSpeechAsync(string text)
    Parameters
    Type Name Description
    System.String text
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.TextToSpeechAsync(String)

    UnregisterFromNotificationHubAsync(Tuple<String, String>)

    Declaration
    protected override Task UnregisterFromNotificationHubAsync(Tuple<string, string> hubSas)
    Parameters
    Type Name Description
    System.Tuple<System.String, System.String> hubSas
    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    SensusServiceHelper.UnregisterFromNotificationHubAsync(Tuple<String, String>)

    Implements

    ISensusServiceHelper
    Back to top Copyright © 2014-2018 University of Virginia
    Generated by DocFX