Commit graph

79 commits

Author SHA1 Message Date
Andy Scherzinger
ddc7ebb814
Fix naming of app in header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-03-24 20:06:56 +01:00
Andy Scherzinger
c2683e0ed0
Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-03-23 17:18:18 +01:00
Andy Scherzinger
65662e90c8
Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-03-17 18:19:19 +01:00
Marcel Hibbe
e3c0d500d8
remove FOREGROUND_SERVICE_PHONE_CALL
FOREGROUND_SERVICE_PHONE_CALL is removed because it is not necessary.

Seems it was introduced when moving to Android 14 because NCFirebaseMessagingService originally contained android:foregroundServiceType="phoneCall"

But this foregroundServiceType is not allowed/necessary for NCFirebaseMessagingService so it was removed, but it was forgotten to also remove FOREGROUND_SERVICE_PHONE_CALL permission.

This commit will remove FOREGROUND_SERVICE_PHONE_CALL permission so release process on gplay won't complain.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-02-16 16:01:23 +01:00
Marcel Hibbe
e4a80429d3
remove foregroundServiceType="phoneCall"
for NCFirebaseMessagingService

Using a foregroundServiceType for firebase is not recommended:
https://firebase.google.com/docs/cloud-messaging/android/client#manifest

and it would violate android14 terms:
https://developer.android.com/about/versions/14/changes/fgs-types-required

tested and notifications still work as expected

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-01-31 11:20:24 +01:00
Andy Scherzinger
69d6d2c043 Add foreground service phone call for gplay build
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-01-30 14:26:08 +01:00
Marcel Hibbe
c7a72aaf4a
add diagnose screen and permission warnings in settings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2024-01-12 09:54:28 +01:00
Marcel Hibbe
119310ecc7
Add fixes and changes to push handling
- Fix injection in GetFirebasePushTokenWorker.
injection was not setup correctly in GetFirebasePushTokenWorker so the appPreferences were null. This resulted in the invinite loading screen during account setup if somehow onNewToken did not set the token.

- avoid to register push on every load of ConversationList.

- call GetFirebasePushTokenWorker instead of PushRegistrationWorker to make sure the firebase token is set(if onNewToken somehow fails to set it). Other than that, only call PushRegistrationWorker directly in NCFirebaseMessagingService as there the token is set.

- add logging

- trigger GetFirebasePushTokenWorker daily with periodical worker (instead monthly), and combine this with PushRegistrationWorker as this is defined inside GetFirebasePushTokenWorker

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2023-12-01 13:35:53 +01:00
Andy Scherzinger
41d671ff47
Fix code formatting
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2023-02-16 09:57:19 +01:00
Marcel Hibbe
ca145d170c
revert calculation of delayed delivery time
this didn't make sense because time between firebase and devices is not synchronized, so the results were useless.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-11-10 13:38:49 +01:00
Marcel Hibbe
3a517f5760
add missed call notification, show delivery delay in debug mode
- add missed call notifications in NotificationWorker and CallNotificationActivity

- introduce refactoring of Notification handling (isolate firebase stuff from other logic). All "UI-notification" logic from ChatAndCallMessagingService was moved to NotificationWorker. ChatAndCallMessagingService was renamed to NCFirebaseMessagingService because it is now only responsible for firebase stuff. This separation should make it easier for alternative push services to dock with the app (if they are incorporated in the future).

- for DEBUG mode: show delivery delay time in notifications (time between sending from firebase to receive on device).

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-11-10 12:17:23 +01:00
Andy Scherzinger
713fc1f10d
Merge pull request #2371 from nextcloud/dependabot/gradle/com.android.tools.build-gradle-7.3.0
Bump gradle from 7.2.2 to 7.3.0
2022-09-16 16:36:33 +02:00
Marcel Hibbe
93da361bf1
fix to keep notification channels
new notification channels must not be deleted. for this an enum was created, so that in removeOldNotificationChannels there is no manual work to do

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-09-16 15:10:15 +02:00
Andy Scherzinger
58436286c7
move to namespace
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-09-16 14:09:40 +02:00
Andy Scherzinger
4bdc2c1081
Migrate recieving calls from requery to room
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-07-16 14:51:07 +02:00
Tim Krüger
c13d23bda2
Make PendingIntent flag immutable
Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:16:54 +02:00
Tim Krüger
0f8830df89
Use log level exception for exceptions
Also log the exception itself instead of the localized message
concatinated in the log message.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 15:00:13 +02:00
Tim Krüger
58c40e6ee2
Remove annotation '@JvmField'
Replace the '@JvmField' with the Kotlin way 'lateinit'.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 10:59:14 +02:00
Tim Krüger
5b5db208ee
Rename 'MagicFirebaseMessagingService'
Renamed the service to 'ChatAndCallMessagingService' to respect that the
service handles chat messages and calls.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-23 10:22:23 +02:00
Tim Krüger
738ed94f98
Add foreground service type to MagicFirebaseMessagingService
Since SDK 31 foreground services can't start while running in
background, except for a few special cases like phone calls.

See:
 - https://developer.android.com/guide/components/foreground-services#background-start-restrictions

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-22 15:51:17 +02:00
Tim Krüger
f366c75f68
Add mandetory intent flags
Since SDK 31 for an 'PendingIntent' the intent flags 'FLAG_IMMUTABLE' or
'FLAG_IMMUTABLE' are mandetory.

Signed-off-by: Tim Krüger <t@timkrueger.me>
2022-06-22 15:33:26 +02:00
Andy Scherzinger
18d375b540
Migrate general models to kotlin data classes
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-05-18 00:36:37 +02:00
Andy Scherzinger
981c885bfc
fix MagicFirebaseMessagingService
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-05-17 10:02:41 +02:00
Marcel Hibbe
1b30a6ef62
allow getPeersForCall without QueryMap
- null was not allowed for query map (led to Illegal Argument Exception which caused issue #1853)

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-03-17 15:17:32 +01:00
Andy Scherzinger
eed209428e
splitting up complex methods into smaller, easier to understand methods
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-15 18:21:29 +01:00
Andy Scherzinger
c9f230a10b
fixes after rebase
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-15 17:46:41 +01:00
Andy Scherzinger
ac703a6ac7
extract magic numbers
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-15 17:46:40 +01:00
Andy Scherzinger
a10b67456c
ignore generic exception handling
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-14 10:23:05 +01:00
Andy Scherzinger
86f8f1d5cd
make constant a constant
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-14 10:23:05 +01:00
Andy Scherzinger
2102f0fbc8
document empty blocks
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-14 10:23:01 +01:00
Andy Scherzinger
8e11f21233
adapt to java->kotlin changes regarding null-ability
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-03-07 09:55:30 +01:00
Marcel Hibbe
73ce2716de
fix klint warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-02-25 12:11:43 +01:00
Marcel Hibbe
d453773a1d
show user statuses in conversation info (wip)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-02-25 12:11:40 +01:00
Andy Scherzinger
4fb61ed046
improve detekt score
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2022-02-16 11:34:07 +01:00
drone
ca7861358d
fix klint + findbugs warnings
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-27 11:57:23 +01:00
Marcel Hibbe
6f302c25c4
add flexinterval for PeriodicWorkRequests
so the actions are not triggered when PeriodicWorkRequests are created.

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:32 +01:00
Marcel Hibbe
c8274fe740
add string for origin to PushRegistrationWorker for debugging
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:31 +01:00
Marcel Hibbe
bdef83d402
reformat code
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:31 +01:00
Marcel Hibbe
4629d02dc4
add copyright + minor refactoring
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:31 +01:00
Marcel Hibbe
76cab3b9a0
add PeriodicWorkRequest to register local token every 24h
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:31 +01:00
Marcel Hibbe
06afd7bec6
set up periodic fetch of firebase token in ClosedInterface for gplay
move OneTimeWorkRequest for PushRegistrationWorker from NextcloudTalkApplication to ClosedInterface for gplay

add check in PushRegistrationWorker if google services are available

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2022-01-26 15:00:31 +01:00
Dariusz Olszewski
2f4aa35c53
Register notification channels on app start-up (Oreo or later)
Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2021-12-14 22:05:48 +01:00
Dariusz Olszewski
e9ac99c5df
Notification settings UI on Oreo or later
* On devices with Android 8.0 (Oreo) or later, use system UI to change notification settings.
* Refactor sound selection code to cover differences between old (pre Oreo) and new devices.
* Always use the same notification channel for calls (Oreo or later).

Signed-off-by: Dariusz Olszewski <starypatyk@users.noreply.github.com>
2021-12-14 22:05:48 +01:00
Tim Krüger
567326da5a
Resolve klint issues
Signed-off-by: Tim Krüger <t@timkrueger.me>
2021-12-02 12:54:26 +01:00
Marcel Hibbe
b652b1136e
fix to stop notification if user joined on other device
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2021-11-23 12:29:53 +01:00
Marcel Hibbe
ec40ca9b66
hangup call notification after 1 minute
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2021-11-23 11:27:47 +01:00
Marcel Hibbe
8381e0b541
add logging for calls
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2021-11-22 22:41:17 +01:00
Marcel Hibbe
c7e38e4859
replace CallNotificationController with Activity (WIP)
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2021-11-11 13:23:40 +01:00
Marcel Hibbe
251d41f7fb
replace CallController with CallActivity etc. (WIP)
- delete MagicCallActivity
- replace butterknife with viewbinding for CallActivity

TODO:
- also switch CallNotificationController to Activity
- check if CallActivity and CallNotificationActivity are called correctly
- testing!

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
2021-11-11 13:23:40 +01:00
Joas Schilling
b9bf035bbc Fix the check if user joined on another device
Signed-off-by: Joas Schilling <coding@schilljs.com>
2021-07-09 19:47:21 +00:00