Interface IDevice
Framework specific interface.
Namespace: EduCATS.Helpers.Forms.Devices
Assembly: EduCATS.dll
Syntax
public interface IDevice
Methods
CancelSpeech()
Cancel speech.
Declaration
void CancelSpeech()
CheckConnectivity()
Check Internet or local network connection.
Declaration
bool CheckConnectivity()
Returns
Type | Description |
---|---|
bool | Is connection established. |
GetAppDataDirectory()
Get app data directory path.
Declaration
string GetAppDataDirectory()
Returns
Type | Description |
---|---|
string | App data directory. |
Remarks
Used to store cache files.
GetBuild()
Get application build.
Declaration
string GetBuild()
Returns
Type | Description |
---|---|
string | Application build. |
GetNamedSize(int, Type)
Get named size.
Declaration
double GetNamedSize(int namedSize, Type type)
Parameters
Type | Name | Description |
---|---|---|
int | namedSize | Named size enum. |
Type | type | Type for size. |
Returns
Type | Description |
---|---|
double | Size. |
GetRuntimePlatform()
Get runtime platform.
Declaration
string GetRuntimePlatform()
Returns
Type | Description |
---|---|
string | Runtime platform. |
GetVersion()
Get application version.
Declaration
string GetVersion()
Returns
Type | Description |
---|---|
string | Application version. |
LaunchFile(string)
Launch file
Declaration
Task LaunchFile(string pathForFile)
Parameters
Type | Name | Description |
---|---|---|
string | pathForFile |
Returns
Type | Description |
---|---|
Task |
MainThread(Action)
Invoke on main thread.
Declaration
void MainThread(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | Action to invoke. |
OpenUri(string)
Open url.
Declaration
Task OpenUri(string url)
Parameters
Type | Name | Description |
---|---|---|
string | url | Url to open. |
Returns
Type | Description |
---|---|
Task | Task. |
SendEmail(string, string, string, string)
Send email.
Declaration
Task<bool> SendEmail(string to, string title, string message, string attachmentPath)
Parameters
Type | Name | Description |
---|---|---|
string | to | Email address to send to. |
string | title | Title. |
string | message | Email message. |
string | attachmentPath | Attachment file path. |
Returns
Type | Description |
---|---|
Task<bool> | Status (sent or not). |
SetNativeTheme(string)
Sets theme for native platform.
Declaration
bool SetNativeTheme(string hexColor)
Parameters
Type | Name | Description |
---|---|---|
string | hexColor | Hex color. |
Returns
Type | Description |
---|---|
bool |
SetTimer(TimeSpan, Func<bool>)
Set timer.
Declaration
void SetTimer(TimeSpan interval, Func<bool> callback)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | interval | Interval. |
Func<bool> | callback | Callback. |
ShareFile(string, string)
Share file.
Declaration
Task ShareFile(string title, string filePath)
Parameters
Type | Name | Description |
---|---|---|
string | title | Title. |
string | filePath | File path. |
Returns
Type | Description |
---|---|
Task | Task. |
Speak(string)
Text-to-speech
Declaration
Task Speak(string text)
Parameters
Type | Name | Description |
---|---|---|
string | text | Text. |
Returns
Type | Description |
---|---|
Task | Task. |