Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: notification library change to Windows APP SDK / misc. improvements&features #18

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f6def58
stash
amadeo-alex Jul 17, 2023
cd68fad
poc
amadeo-alex Jul 21, 2023
9682ff2
fixed actionable notifications not passing correct data to HA/MQTT
amadeo-alex Jul 21, 2023
bd05229
cleanup
amadeo-alex Jul 22, 2023
cb73425
added proper handling of notification manager unregistering
amadeo-alex Jul 22, 2023
b8788e7
renamed _toasNotifier
amadeo-alex Jul 22, 2023
88d7d52
added log error when notification is not shown
amadeo-alex Jul 22, 2023
3e25dd5
added arguments logging when in debug mode
amadeo-alex Jul 22, 2023
1d77bb9
changed how log file name is assigned, fixed log name being malformed…
amadeo-alex Jul 22, 2023
3589255
added remove todo
amadeo-alex Jul 22, 2023
699bb18
added proper handling of notifications activated while application wa…
amadeo-alex Jul 22, 2023
20dabc7
added todos
amadeo-alex Jul 22, 2023
b10fc43
added ability to specify input for notification / finished input func…
amadeo-alex Jul 23, 2023
9064c08
added HA onboarding note that provided token must be owned by admin a…
amadeo-alex Jul 24, 2023
c4e5bbc
removed unnecessary click assignment
amadeo-alex Jul 24, 2023
aeafeba
added EnableUnsafeBinaryFormatterSerialization to fix runtime error r…
amadeo-alex Jul 24, 2023
997eef9
returns unchanged uri if starts with "file://"
amadeo-alex Jul 24, 2023
aee179e
cleanup
amadeo-alex Jul 25, 2023
772bdb2
poc for retrieving remote files with HA bearer token authentication
amadeo-alex Jul 25, 2023
d220ade
added request success validation and debug message when bearer token …
amadeo-alex Jul 25, 2023
aa0e531
removed unnecessary var assignment
amadeo-alex Jul 25, 2023
e941f35
poc uri passthrough
amadeo-alex Aug 17, 2023
e394868
small cleanup, replaced NET.JSON with Newtonsoft.JSON
amadeo-alex Aug 17, 2023
3daa402
added option to treat URI elements of notification action like androi…
amadeo-alex Aug 17, 2023
367cb6b
added missing translations
amadeo-alex Aug 17, 2023
95bb55c
expanded the notification example with buttons/image/input
amadeo-alex Aug 17, 2023
ce9dd37
added notification argument encoding to fix characters like "=" or "%"
amadeo-alex Aug 20, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,22 @@ private void BtnSendTestNotification_Click(object sender, EventArgs e)
var testNotification = new Notification
{
Message = Languages.ConfigNotifications_TestNotification,
Title = "HASS.Agent"
Title = "HASS.Agent",
Data = new NotificationData()
{
Image = "https://cdn.pixabay.com/photo/2017/07/25/01/22/cat-2536662_960_720.jpg",
Actions = new List<NotificationAction>()
{
new NotificationAction(){ Action = "hass_test_yesAction", Title = Languages.ConfigNotifications_TestNotification_Yes},
new NotificationAction(){ Action = "hass_test_noAction", Title = Languages.ConfigNotifications_TestNotification_No}
},
Inputs = new List<NotificationInput>()
{
new NotificationInput(){ Id = "hass_test_input",
Title = Languages.ConfigNotifications_TestNotification_InputTitle,
Text = Languages.ConfigNotifications_TestNotification_InputText}
}
}
};

Log.Information("[NOTIFIER] Attempting to show test notification ..");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,64 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema

Version 2.0

The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.

Example:

... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>

There are any number of "resheader" rows that contain simple
name/value pairs.

Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.

The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:

Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.

mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.

mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
Expand Down Expand Up @@ -117,4 +57,16 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="LblInfo2.Text" xml:space="preserve">
<value>If something is not working, make sure you try the following steps:

- Install the HASS.Agent integration
- Restart Home Assistant
- Make sure HASS.Agent is active with MQTT enabled!
- Your device should get detected and added as an entity automatically
- Optionally: manually add it using the local API</value>
</data>
<data name="LblInfo1.Text" xml:space="preserve">
<value>HASS.Agent can receive notifications from Home Assistant, using text, images and actions. If you have MQTT enabled, your device will automatically get added. Otherwise, manually configure the integration to use the local API.</value>
</data>
</root>
Loading