diff options
| author | Po Lu | 2023-08-20 20:23:56 +0800 |
|---|---|---|
| committer | Po Lu | 2023-08-20 20:25:53 +0800 |
| commit | 4f714dc08137d36d0d1e886814008f2abe5712c0 (patch) | |
| tree | e400e9263e9c1b779b07e56ea88533e6bd4adfb0 /java/res/layout | |
| parent | 321f6bd5722921175ac3dc8859daca74dbe3de6a (diff) | |
| download | emacs-4f714dc08137d36d0d1e886814008f2abe5712c0.tar.gz emacs-4f714dc08137d36d0d1e886814008f2abe5712c0.zip | |
Support desktop notifications on Android
* doc/emacs/android.texi (Android Environment): Correct list of
permissions granted by default.
* doc/lispref/os.texi (Desktop Notifications): Document the new
function `android-notifications-notify' and its limitations.
* java/AndroidManifest.xml.in: Request notification permissions.
* java/org/gnu/emacs/EmacsDesktopNotification.java: New file.
* java/res/layout/sdk8_notifications_view.xml: New file holding
substitute notification widget definitions for Android versions
prior to 3.0.
* java/res/values/strings.xml: Remove inadvertently introduced
tag attribute.
* lisp/org/org-clock.el (haiku-notifications-notify): Correct
file name in function declaration.
(android-notifications-notify): New declaration.
(org-show-notification): Use `android-notifications-notify'.
* src/androidselect.c (android_init_emacs_desktop_notification)
(android_notifications_notify_1, Fandroid_notifications_notify):
New functions.
(init_androidselect, syms_of_androidselect): Initialize new
class and define new subr.
Diffstat (limited to 'java/res/layout')
| -rw-r--r-- | java/res/layout/sdk8_notifications_view.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/java/res/layout/sdk8_notifications_view.xml b/java/res/layout/sdk8_notifications_view.xml new file mode 100644 index 00000000000..2daa5beea86 --- /dev/null +++ b/java/res/layout/sdk8_notifications_view.xml | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | <!-- Notification content widget tree for GNU Emacs on Android 2.3. | ||
| 2 | |||
| 3 | Copyright (C) 2023 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | it under the terms of the GNU General Public License as published by | ||
| 9 | the Free Software Foundation, either version 3 of the License, or | ||
| 10 | (at your option) any later version. | ||
| 11 | |||
| 12 | GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | GNU General Public License for more details. | ||
| 16 | |||
| 17 | You should have received a copy of the GNU General Public License | ||
| 18 | along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. --> | ||
| 19 | |||
| 20 | <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | ||
| 21 | android:orientation="vertical" | ||
| 22 | android:layout_width="match_parent" | ||
| 23 | android:layout_height="wrap_content" | ||
| 24 | android:padding="8dp"> | ||
| 25 | <TextView android:id="@+id/sdk8_notifications_title" | ||
| 26 | android:layout_width="wrap_content" | ||
| 27 | android:layout_height="wrap_content"/> | ||
| 28 | <TextView android:id="@+id/sdk8_notifications_content" | ||
| 29 | android:layout_width="wrap_content" | ||
| 30 | android:layout_height="wrap_content"/> | ||
| 31 | </LinearLayout> | ||