Yuito-app-android/app/src/main/java/com/keylesspalace/tusky
Peter Cai 9ec5d6e3b0
Push notifications support via UnifiedPush (#2303)
Fixes #793.

This is an implementation for push notifications based on UnifiedPush
for Tusky. No push gateway (other than UP itself) is needed, since
UnifiedPush is simple enough such that it can act as a catch-all
endpoint for WebPush messages. When a UnifiedPush distributor is present
on-device, we will by default register Tusky as a receiver; if no
UnifiedPush distributor is available, then pull notifications are used
as a fallback mechanism.

Because WebPush messages are encrypted, and Mastodon does not send the
keys and IV needed for decryption in the request body, for now the push
handler simply acts as a trigger for the pre-existing NotificationWorker
which is also used for pull notifications. Nevertheless, I have
implemented proper key generation and storage, just in case we would
like to implement full decryption support in the future when Mastodon
upgrades to the latest WebPush encryption scheme that includes all
information in the request body.

For users with existing accounts, push notifications will not be enabled
until all of the accounts have been re-logged in to grant the new push
OAuth scope. A small prompt will be shown (until dismissed) as a
Snackbar to explain to the user about this, and an option is added in
Account Preferences to facilitate re-login without deleting local drafts
and cache.
2022-05-17 19:32:09 +02:00
..
adapter fix notification message formatting when username is not at the beginning of the message (#2522) 2022-05-13 22:00:30 +02:00
appstore Improve timeline dao (#2353) 2022-03-02 20:40:06 +01:00
components Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
db Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
di Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
entity Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
fragment fix unparsed html when sharing status content (#2491) 2022-05-03 19:13:13 +02:00
interfaces fix SearchActivity transition animations (#2464) 2022-04-28 20:37:46 +02:00
json move Html parsing to ViewData (#2414) 2022-04-15 13:20:27 +02:00
network Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
pager move AccountActivity and related classes to a new package (#2216) 2022-01-11 19:55:17 +01:00
receiver Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
service Check if media processing finished before sending status (#2458) 2022-04-28 20:37:31 +02:00
settings New emoji picker (#2395) 2022-04-26 18:50:58 +02:00
util Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
view Use tags from status when adding handlers to hashtag spans in status content (#2344) 2022-02-25 18:56:21 +01:00
viewdata move Html parsing to ViewData (#2414) 2022-04-15 13:20:27 +02:00
viewmodel introduce KotlinResultCallAdapter for nice suspending network calls (#2415) 2022-04-14 19:49:49 +02:00
AboutActivity.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
AccountListActivity.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
AccountsInListFragment.kt Fix status diffing and improve timeline performance (#2386) 2022-03-15 21:34:57 +01:00
BaseActivity.java Implement Login via WebView (#2371) 2022-03-08 21:22:19 +01:00
BottomSheetActivity.kt Use tags from status when adding handlers to hashtag spans in status content (#2344) 2022-02-25 18:56:21 +01:00
EditProfileActivity.kt update Android Image Cropper and get rid of deprecated onActivityResult (#2351) 2022-03-02 20:39:56 +01:00
FiltersActivity.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
LicenseActivity.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
ListsActivity.kt merge ModalTimelineActivity & ViewTagActivity into StatusListActivity (#2332) 2022-02-25 18:57:31 +01:00
MainActivity.kt Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
SplashActivity.kt Push notifications support via UnifiedPush (#2303) 2022-05-17 19:32:09 +02:00
StatusListActivity.kt merge ModalTimelineActivity & ViewTagActivity into StatusListActivity (#2332) 2022-02-25 18:57:31 +01:00
TabData.kt Timeline paging (#2238) 2022-01-11 19:00:29 +01:00
TabPreferenceActivity.kt add ktlint plugin to project and apply default code style (#2209) 2021-06-28 21:13:24 +02:00
TuskyApplication.kt New emoji picker (#2395) 2022-04-26 18:50:58 +02:00
ViewMediaActivity.kt upgrade ktlint gradle plugin to 10.2.1 (#2435) 2022-04-16 09:45:45 +02:00
ViewThreadActivity.java Use tags from status when adding handlers to hashtag spans in status content (#2344) 2022-02-25 18:56:21 +01:00