A phms/Database.cs => phms/Database.cs +13 -0
@@ 0,0 1,13 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+using Npgsql;
+
+namespace phms
+{
+ public class Database
+ {
+ public static string DatabaseUri { get; set; }
+
+ public static NpgsqlConnection Connection => new NpgsqlConnection(DatabaseUri);
+ }
+}<
\ No newline at end of file
A phms/Notes.cs => phms/Notes.cs +18 -0
@@ 0,0 1,18 @@
+// SPDX-License-Identifier: AGPL-3.0-or-later
+
+using Android.App;
+using Android.Content;
+
+namespace phms
+{
+ public static class Notes
+ {
+ public static void Send(string message)
+ {
+ var intent = new Intent(Application.Context, typeof(BackgroundService));
+ intent.SetAction(BackgroundService.UpdateNotificationAction);
+ intent.PutExtra("message", message);
+ Application.Context.StartService(intent);
+ }
+ }
+}<
\ No newline at end of file