Commit graph

232 commits

Author SHA1 Message Date
kana-shii
c41d5fb847
feat(discord): Discord RPC from Anikku (#1100)
* Add RPC [Barebone, barely works]

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* refactor connections

* RPC (#223)

* Add error handling and refactor DiscordRPCService methods

* Add Discord RPC customization options and preferences

* Update Discord RPC button labels and clean up comments

* Refactor DiscordRPCService to improve readability by adding braces for null checks

* Refactor ConnectionsPreferences to improve code clarity and organization

* Refactor ConnectionsPreferences to improve code clarity and organization

(cherry picked from commit df42d196368d28c3c9dcee3692f3f9140da7f2a1)

* Feat: implement Discord account management enhancements and RPC restart functionality (#245)

* fix: correct indentation in CastManager for better readability

* feat: implement Discord account management enhancements and RPC restart functionality

(cherry picked from commit b7c50f1f0184dd717c5cc4dee0310053bfb8d613)

* Notification color & icon for DiscordRPC

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* Change foss variant application id suffix to '.foss' and more (mihonapp/mihon#1831)

- Remove `BuildConfig.PREVIEW`
- Rename `BuildConfig.INCLUDE_ANALYTICS` -> `BuildConfig.ANALYTICS_INCLUDED`
- Rename `BuildConfig.INCLUDE_UPDATER` -> `BuildConfig.UPDATER_ENABLED`
- Rename build property `with-analytics` -> `include-analytics`
- Rename build property `with-updater` -> `enable-updater`
- Add build property to disable code shrink
- Add build property to include dependency info in apk/app bundle

(cherry picked from commit 0893609ad2c4791dc404d72a5e69a2e0373517ae)

* feat(discord): update App/icon & fully works with all screens

* update Discord Rich Presence application ID and icon URLs

* Fix updateDiscordRPC for all screens (also reuse code)

* integrate Discord Rich Presence for WebViewScreen

* feat: ghibli style images for Discord RPC

* optimize code

* further optimize

* supprest useless warning

* refactor: simplify setScreen calls related to lastUsedScreen

* optimize whole file

* a

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* fix(discord): update download button URL to point to the official website

* feat(discord): allow stop Discord RPC from notification

also improve error handling

* fix(i18n): Torrent server "stop" multi-lang

* Start DiscordRPCService as foreground service on Android O+

This commit modifies the `DiscordRPCService` to start as a foreground service on Android O (API level 26) and above. This change ensures the service continues to run in the background, especially when the app is not in the foreground.

- Added a conditional check using `Build.VERSION.SDK_INT` to detect if the device is running Android O or later.
- If the device is running Android O or later, `startForegroundService` is called instead of `startService` to ensure it runs as foreground service.
- If the device is running a version prior to Android O, `startService` is called.

(cherry picked from commit 869617d8cac3aa8461158f1f9a34b9e29147e8f0)

* fix(discord): episode/chapter formating

* fix(discord): Fix & improve Discord login/accounts

* New webview with DiscordLoginScreen

* Add appbar

* Using Webview directly instead of AndroidView and add clearCookies, browsing navigation

* Using coroutine instead of thread

* Revert service

* use response block

* save preference in coroutine too

* no web navigator

* address comments for DiscordLoginScreen

* Refactor Settings screen & dialog

* Using serialization to parse JSON to avoid blocking API

* Don't clear all cookies and web storage aggressively

* Extract constant

* Fix login

Co-Authored-By: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>

* fix(discord): Fix screen crash & token retrievement

* Update images to my liking

* spotless

* small fixes

* Update strings.xml

* Revert "Update images to my liking"

This reverts commit 4ad3b9f84fdada45ee480ae7dc242b6e1b4bc18a.

* small fixes

* hopeful fix + chapter progress

* Update ReaderActivity.kt

* Update ReaderActivity.kt

* remove timestamps

* Remove isNSFW check

because 95% of tachi extensions are rated as +18, even when there is sfw content

* Clean up

* Fix ReaderActivity

* Cleanup Settings

* Fix login

* Fix lag when getting categories

* Fix jump to pages

* Remove old SDK check

* Fix status when back from reading

* Remove pages progress

* Only set necessary action in ReaderActivity

* Using IO coroutine instead

* Add back timestamps

* Fix strings & settings

* Fix crash

* ActivityType

* Adjust description

* refactor Discord settings menu

* Using its own scope

* Optimize the connection waiting

* remove source.isNSFW

* Using screenModelScope

* Fix state access

* add modifier

* sharing OkHttpClient instance for better resource management

* Restart RPC directly via service intent instead of toggling

* remove lint suppression

* add back showProgress

* Fix set Discord status

* Fix Discord login no avatar

* Handle API rate limits and errors in getDiscordUri

* Token-based isLogged checking

* Make Discord token sensitive data and not in backup

* Minor fix

* remove debug message

---------

Co-authored-by: Cuong-Tran <16017808+cuong-tran@users.noreply.github.com>
Co-authored-by: Cuong-Tran <cuongtran.tm@gmail.com>
Co-authored-by: Dark25 <nadiecaca2000@gmail.com>
Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
Co-authored-by: Jery <jery99961@gmail.com>
2025-09-04 12:40:32 +07:00
Callum Wong
3f2eb75b71 Add QR code scan button for sync API key (jobobby04/tachiyomiSY#1430)
* Add dependency com.journeyapps:zxing-android-embedded:4.3.0

* Add widget parameter to EditTextPreferenceWidget

* Add QR code scanner icon button to sync API key preference which launches a ScanContract

* Remove screenOrientation property from CaptureActivity manifest

* Allow scanning both normal and inverted codes

* store values and make code more concise

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>

* Import local context

---------

Co-authored-by: jobobby04 <jobobby04@users.noreply.github.com>
(cherry picked from commit 84c7da5a7d244ffc0cd7155d15e0a200f548ad35)
2025-06-15 22:28:03 +07:00
Cuong-Tran
7dd57c54bc
chore(storage): check valid data folder location & handle permission for device without FilePicker (#906)
* fix(storage): setting app's data folder on Android TV

Also check if set location is actually accessible then update UI compose accordingly (for all devices) in some cases (e.g. location set but actual folder was deleted or permission revoked)

(cherry picked from commit ef56b7f11ef0d243ef14816e85afa360f1137fe8)

* chore(storage): improve permission handling for older Android version & Fire TV

(cherry picked from commit 5ee009a6db73d33687e55ee8f4ad6412a9e320d4)
2025-05-11 23:24:16 +07:00
cfouche
6ce4b2799c
Update base URL and host for Pururin to pururin.me (jobobby04/TachiyomiSY#1415)
(cherry picked from commit dbd44374743a4022bf365440ac7bb40a3ff408f8)
2025-03-23 23:47:27 +07:00
AntsyLich
81209fb0d6
Move firebase stuff to a standalone module (mihonapp/mihon#1841)
(cherry picked from commit 046f09c4bdf8fe8bfe5886afefa0e440376184e7)
2025-03-23 23:43:06 +07:00
AntsyLich
49152d75da
Fix analytics/crashlytics configuration not being set after fe22f5a (mihonapp/mihon#1838)
(cherry picked from commit 7913679f9d1515aa988931bb026297cd38e4dd67)
2025-03-23 23:43:06 +07:00
Cuong-Tran
a8c587829c
Auto install app update (#561)
* migrating

* - Fix Broadcaster
- Include Updater for Debug
- json to emulate Github call

* - resetup AppUpdateJob when changing settings
- Fix ACTION_MY_PACKAGE_REPLACED

* improve notification

* update icon

* app update to high important

* - Run auto install on AppUpdateJob
- Add release link to job

* idle state & network aware

* fix duplicated job start

* don't show notification & start job for peek-into-preview

* allow cancel auto update job when set to NEVER

* always notify on install complete

* rearm AppUpdateJob each time MainActivity already checked for update

* MainActivity checks every 2 days, rearm AutoUpdateJob in 3 days

* - fix install error notification ID
- add timeout for manual installation if package manager crash

* settings & spotless

* restriction settings & auto run download-install if not in restrictions

* clean up
2024-12-05 15:41:50 +07:00
AntsyLich
a408fedeb3
Move firebase permission removal to standard flavor
And disable some more stuff

(cherry picked from commit be671b42cefd70180644e01bb065a18cb7701bf9)
2024-09-19 13:04:19 +07:00
AntsyLich
1b637c9f4a
Remove more unnecessary permissions from Firebase dependency
(cherry picked from commit 02af9b1acf9f590d29560bc3fc90d206e8e6e1af)
2024-09-05 13:46:06 +07:00
Cuong-Tran
c16ed41c2f
feat: Add onboarding permissions request for external storage
support save covers & using custom covers depends on the Android version
2024-07-30 18:29:04 +07:00
Cuong M. Tran
221b55536f
New app icon 2024-06-14 23:16:42 +07:00
KaiserBh
d7ed145c82
feat: add cross device sync (#1005)
* feat: add cross device sync.

* chore: add google api.

* chore: add SY specifics.

* feat: add backupSource, backupPref, and "SY" backupSavedSearches.

I forgot to add the data into the merging logic, So remote always have empty value :(. Better late than never.

* feat(sync): Allow to choose what to sync.

Various improvement and added the option to choose what they want to sync. Added sync library button to LibraryTab as well.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* oops.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: fix up the sync triggers, and update imports.

* refactor

* chore: review pointers.

* refactor: update imports

* refactor: add more error guard for gdrive.

Also changed it to be app specific, we don't want them to use sync data from SY or other forks as some of the model and backup is different. So if people using other forks they should use the same data and not mismatch.

* fix: conflict and refactor.

* refactor: update imports.

* chore: fix some of detekt error.

* refactor: add breaks and max retries.

I think we were reaching deadlock or infinite loop causing the sync to go forever.

* feat: db changes to accommodate new syncing logic.

Using timestamp to sync is a bit skewed due to system clock etc and therefore there was a lot of issues with it such as removing a manga that shouldn't have been removed. Marking chapters as unread even though it was marked as a read. Hopefully by using versioning system it should eliminate those issues.

* chore: add migrations

* chore: version and is_syncing fields.

* chore: add SY only stuff.

* fix: oops wrong index.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: review pointers.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove the option to reset timestamp

We don't need this anymore since we are utilizing versioning system.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: Forgot to use the new versioning system.

I forgot to cherry pick this from mihon branch.

* chore: remove isSyncing from Chapter/Manga model.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove unused import.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove isSyncing leftover.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* chore: remove isSyncing.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

* refactor: make sure the manga version is bumped.

When there is changes in the chapters table such as reading or updating last read page we should bump the manga version. This way the manga is synced properly as in the History and last_read history is synced properly. This should fix the sorting issue.

Signed-off-by: KaiserBh <kaiserbh@proton.me>

---------

Signed-off-by: KaiserBh <kaiserbh@proton.me>
2024-03-29 12:00:26 +07:00
Cuong M. Tran
65e27880bd
Support both Komikku & Mihon tracking 2024-02-08 01:50:14 +07:00
Cuong M. Tran
c3246bf4b6
Make tracker use Komikku’s client 2024-02-08 00:19:32 +07:00
Cuong M. Tran
da890c42d7
Remove files executable permission 2024-01-28 23:44:37 +07:00
arkon
807af9a35d Allow deep linking to add external repo
(cherry picked from commit f115edf2eac125d0e6a0fdec79bd9d6627c3c53b)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
2024-01-09 18:51:59 -05:00
arkon
c801aec27a Allow opening .tachibk files directly with app to restore
(cherry picked from commit 727289c8ebf504edbd1d330ac1ab9091908fc086)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
2024-01-09 18:51:56 -05:00
arkon
4003263828 Address some build warnings
(cherry picked from commit 2d7650537db907a4129f4a07db15950339b319e9)

# Conflicts:
#	README.md
#	app/src/main/java/eu/kanade/presentation/category/components/CategoryDialogs.kt
#	source-api/src/commonMain/kotlin/eu/kanade/tachiyomi/source/model/SManga.kt
2023-12-25 19:47:20 -05:00
arkon
c3f5a5d7e0 Set foreground service type for ExtensionInstallService
(cherry picked from commit 8aaf8df7080c232e3bb7966a88f608a4e176a525)
2023-12-24 14:03:34 -05:00
Ivan Iskandar
2e5c31f3d6 Define storage permission in manifest (#10200)
Mainly for migration process and to avoid breakage on users who doesn't
change their granular storage prefs.

(cherry picked from commit e5a22eafe72b701ed277d937a5c0f25d84a5eb25)
2023-12-24 12:15:19 -05:00
Ivan Iskandar
fcb230df45 Migrate downloader service to WorkManager (#10190)
(cherry picked from commit 8ce8b600922410a4eb64da35a1850840a2f28669)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/download/DownloadService.kt
2023-12-24 11:53:10 -05:00
arkon
ab63f6036c Remove storage permissions
Requires adjusting some file reading to first copy to a temporary file
in cache that we have permissions to read from. This is only applicable for things
like ZIP files where we need an actual File rather than just some Android content
URI shenanigans.

(cherry picked from commit 4fcdde4913df28bbd678ae1be4a2971ed77179d3)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/RarPageLoader.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ZipPageLoader.kt
#	source-local/src/androidMain/kotlin/tachiyomi/source/local/LocalSource.kt
2023-12-24 11:46:47 -05:00
arkon
47f9bf08cc Replace AppUpdateService with a WorkManager job
Fixes #7773

Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
(cherry picked from commit eed57b80be077a9f73c36d8dc572f34f59c1ba8d)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/updater/AppUpdateService.kt
2023-10-29 12:47:28 -04:00
Ivan Iskandar
32b97eb206 "Updates" widget for Galaxy Z Flip5 cover screen (#9892)
(cherry picked from commit 816d7815e94f8b1286e17b1459c3a01a9aba7369)
2023-09-04 12:15:26 -04:00
arkon
347f98b392 Add ResolvableSource interface for potentially opening entries directly based on some URI via a share intent
Implemented as an intermediate step in the existing Global Search share intent workflow.
If any source manages to resolve the URI (e.g., a URL, a slug, etc.), the resolved SManga entry
is directly opened. If nothing gets resolved, continue to a Global Search.

(cherry picked from commit 6d9a8a30e974574b8d92ba478333e6f62b0de2e2)
2023-09-03 23:32:42 -04:00
arkon
095c5f829e Remove unnecessary profileable flag in manifest
(cherry picked from commit 400ca48456c3aad6572aaa1893ba11466bbad6f5)

# Conflicts:
#	app/src/main/baseline-prof.txt
2023-08-12 16:47:46 -04:00
arkon
95c8ae8cad Combine tracking OAuth login activities
(cherry picked from commit 9dc66c7c8d6280afecc01e64ca24a3899a36105e)
2023-08-12 16:46:31 -04:00
arkon
6b1bcb1511 Enable predictive back gesture for Android 13 (behind developer option)/14+
(cherry picked from commit a4d86a2e1e525dce9fb12f323b7013394639b577)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
2023-05-20 19:24:29 -04:00
arkon
15d52784f8 Convert BackupRestoreService to a WorkManager job
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
(cherry picked from commit cdc160afc2e3bb615fe35c8d7261a3bc16f61996)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupRestorer.kt
2023-03-20 18:42:05 -04:00
Ivan Iskandar
4f4205230f Fully utilize WorkManager for library updates (#9007)
No more trampolining, and stuff.

It's pretty much straight copy-paste from the service, with
some changes related to cancellation handling. Manual updates
will also runs with workman job so auto update work
scheduling need some adjustments too.

Bumped version code to re-enqueue auto update job with the
new spec.

Co-authored-by: arkon <arkon@users.noreply.github.com>
(cherry picked from commit ef9dacde79b1803ec117aae4ea948194b6394605)

# Conflicts:
#	app/build.gradle.kts
#	app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/library/LibraryUpdateService.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryTab.kt
2023-02-26 20:50:47 -05:00
Andreas
d8a938374a Move Glance Widget to seperate module (#8989)
Move Widget to seperate module

- Create a core module for presentation. Widget and App will share some resources and hopefully composables

(cherry picked from commit 12e41b6e6f3b5d95d19e1caa6c9fbe5eb6c9749c)
2023-02-09 17:28:55 -05:00
Jobobby04
708b868e7b MangaDex OAuth
Co-authored-by: Carlos <2092019+CarlosEsco@users.noreply.github.com>
2022-12-20 13:34:01 -05:00
Jobobby04
0784629cbb Remove auto-solve captcha 2022-12-03 13:54:14 -05:00
arkon
0b7861e794 Explicitly add READ_APP_SPECIFIC_LOCALES permission
Some devices are throwing a SecurityException (calling getApplicationLocales) for some reason.

(cherry picked from commit 7e74949d38a8ea43120e672c61556419157a4af1)
2022-11-26 13:45:07 -05:00
arkon
8caa3ce4fb Don't export CrashActivity 2022-10-26 23:35:20 -04:00
arkon
f367a121ac Explicitly remove com.google.android.gms.permission.AD_ID permission
(cherry picked from commit 39e41510d0152db8b50a5c5e58b547dab65652d3)
2022-10-22 21:44:25 -04:00
arkon
1e03d4edad Disable Firebase advertising ID collection
https://firebase.google.com/docs/analytics/configure-data-collection?platform=android#disable_advertising_id_collection
(cherry picked from commit 9c8ccb8e0ea8a5a2a7cfb21ef322c49603809e1b)

# Conflicts:
#	app/src/main/AndroidManifest.xml
2022-10-22 20:32:59 -04:00
Andreas
d07ea91c27 Add Crash activity (#8216)
* Add Crash activity

When the application crashes this sends them to a different activity with the cause message and an option to dump the crash logs

* Review changes

(cherry picked from commit 4178f945c9b6bcae9323c02534d7e620136a4e76)

# Conflicts:
#	app/src/main/java/eu/kanade/presentation/more/settings/screen/SettingsAdvancedScreen.kt
2022-10-17 00:10:30 -04:00
Basara-Hatake
7fd4f5ee97
remove dead delegatedsources (#701) 2022-10-15 12:08:26 -04:00
Ivan Iskandar
cb1d47c685 Setup Baseline Profile (#8135)
* Setup Baseline Profile

Adds Baseline Profile generator and startup time test.
Readme included in macrobenchmark module to run the generator.

* changes

(cherry picked from commit 3b623964421b6bc196bcf751f920975c47884326)

# Conflicts:
#	app/build.gradle.kts
#	gradle/androidx.versions.toml
2022-10-08 18:03:47 -04:00
arkon
7f29d6fc74 Minor cleanup
Also add POST_NOTIFICATIONS permissions to make Android Studio stop complaining about it.

(cherry picked from commit b37b3767f3c55a74bede78d11300249ab419a4c7)
2022-09-22 12:48:23 -04:00
Ivan Iskandar
7ef4291763 Reinstate in-app language picker (#7493)
Also add required config for android 13 system picker

(cherry picked from commit 2d690a09b37a55e87ce4365102ee818c5d9d1ba0)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsGeneralController.kt
2022-08-14 16:07:33 -04:00
Andreas
5baddd8a74 Add task to generate locales_config.xml (#7754)
(cherry picked from commit 4291cc8eb1f4385528afcc9cab2592c8b3afa44a)

# Conflicts:
#	.gitignore
2022-08-14 16:05:27 -04:00
Ivan Iskandar
46cbcfc82e Glance widget for Updates (#7581)
* glance

* glance2

(cherry picked from commit 29e1976b90c5dfdc7cd649740d475d86c321f573)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/App.kt
2022-07-31 11:51:51 -04:00
Andreas
13cb242f51 Replace package with namespace (#7436)
(cherry picked from commit 5d77ee37d2e66dc39e2eee0efba90872818259d8)
2022-07-02 19:42:26 -04:00
arkon
b16f91571d Stop allowing keeping app data on uninstall
Seems to be more trouble than it's worth since it makes the app uninstallable without manually deleting app data. Users have to go out of their way to save data into the app data folder now anyway.

(cherry picked from commit 83a04da4a0819c74a8aeec265976067ecaab53c3)
2022-04-15 17:47:35 -04:00
Ivan Iskandar
7918b3b26b Use existing worker for manual backup creation (#6718)
* Use existing worker for manual backup creation

This will show the "creating backup" notification when auto backup is
running. Complete or error notification will continue to be shown only on
manual job.

* Make sure disabling auto backup don't cancel running manual backup job

(cherry picked from commit d53bb4c337da6df807b43295d2991e8af9015098)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/AbstractBackupManager.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/BackupCreateService.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupManager.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt
2022-03-04 16:13:24 -05:00
Jobobby04
b7a94a72fa Rewrite intent filters for Android 12 compliance 2022-01-23 17:08:32 -05:00
arkon
c4f06d9830 Rename app updating classes
So I stop confusing it for updaters of other things.

(cherry picked from commit 21e647017b629d1ec07a32b548d27342810a2c6b)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/Migrations.kt
2021-10-23 14:25:02 -04:00
Ivan Iskandar
fa14a1cb6d Implement new extension install methods (#5904)
* Implement new extension install methods

* Fixes

* Resolve feedback

* Keep pending status when waiting to install

* Cancellable installation

* Remove auto error now that we have cancellable job

(cherry picked from commit b284384f0ad318fea24e7324a4621e12eb9aca7f)

# Conflicts:
#	app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferenceValues.kt
#	app/src/main/java/eu/kanade/tachiyomi/data/preference/PreferencesHelper.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/browse/extension/ExtensionHolder.kt
#	app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAdvancedController.kt
2021-09-26 13:28:48 -04:00