Class AndroidSensusServiceHelper
Inheritance
System.Object
AndroidSensusServiceHelper
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
DeviceId
Declaration
public override string DeviceId { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
DeviceManufacturer
Declaration
public override string DeviceManufacturer { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
DeviceModel
Declaration
public override string DeviceModel { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
IsCharging
Declaration
public override bool IsCharging { get; }
Property Value
Type |
Description |
System.Boolean |
|
Overrides
OperatingSystem
Declaration
public override string OperatingSystem { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
PushNotificationToken
Declaration
public override string PushNotificationToken { get; }
Property Value
Type |
Description |
System.String |
|
Overrides
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
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
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
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
EnableProbeWhenEnablingAll(Probe)
Declaration
public override bool EnableProbeWhenEnablingAll(Probe probe)
Parameters
Type |
Name |
Description |
Probe |
probe |
|
Returns
Type |
Description |
System.Boolean |
|
Overrides
GetQrCodeImageSource(String)
Declaration
public override ImageSource GetQrCodeImageSource(string contents)
Parameters
Type |
Name |
Description |
System.String |
contents |
|
Returns
Type |
Description |
Xamarin.Forms.ImageSource |
|
Overrides
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
LetDeviceSleepAsync()
Declaration
public override Task LetDeviceSleepAsync()
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
ProtectedFlashNotificationAsync(String)
Declaration
protected override Task ProtectedFlashNotificationAsync(string message)
Parameters
Type |
Name |
Description |
System.String |
message |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
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
RequestNewPushNotificationToken()
Declaration
protected override void RequestNewPushNotificationToken()
Overrides
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
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
SetFocusedMainActivity(AndroidMainActivity)
Declaration
public void SetFocusedMainActivity(AndroidMainActivity focusedMainActivity)
Parameters
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
TextToSpeechAsync(String)
Declaration
public override Task TextToSpeechAsync(string text)
Parameters
Type |
Name |
Description |
System.String |
text |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
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
Implements