Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
410f89a
Enhanced player implementation
dbotvin Nov 17, 2025
f73245f
Enhanced player implementation
AlexViseven Dec 12, 2025
751276c
Rename .java to .kt
alperozturk96 Feb 16, 2026
5eae21a
fix build
alperozturk96 Feb 16, 2026
d232193
fix codacy
alperozturk96 Feb 16, 2026
7d9c36a
remove unused activity
alperozturk96 Feb 16, 2026
9e517c8
remove unused activity
alperozturk96 Feb 16, 2026
65188eb
use m3 icon buttons and add content description
alperozturk96 Feb 17, 2026
95e5162
fix codacy
alperozturk96 Feb 17, 2026
9a197f8
fix action bar title after playing music
alperozturk96 Feb 17, 2026
7b2a182
wip
alperozturk96 Apr 23, 2026
a8df0d8
onPlaybackError
alperozturk96 Apr 23, 2026
d513b35
Rename .java to .kt
alperozturk96 Apr 23, 2026
f5ddf01
handle stream media operation better
alperozturk96 Apr 23, 2026
98aed34
handle stream media operation better
alperozturk96 Apr 23, 2026
22f42b6
handle stream media operation better
alperozturk96 Apr 23, 2026
2987d5f
Update license identifier
AlexViseven May 21, 2026
6c203a2
wip
alperozturk96 Aug 14, 2026
bb7aa88
wip
alperozturk96 Aug 14, 2026
ec4a552
wip
alperozturk96 Aug 14, 2026
e089eda
wip
alperozturk96 Aug 21, 2026
d6a84dd
wip
alperozturk96 Aug 21, 2026
05051f7
wip
alperozturk96 Aug 21, 2026
bc26f2f
fix using new players
alperozturk96 Aug 21, 2026
29a5b7c
simplify approach
alperozturk96 Aug 21, 2026
9aa3972
remove unused classes
alperozturk96 Aug 21, 2026
0d65ab5
fix lint
alperozturk96 Sep 1, 2026
da4763e
update icons use m3
alperozturk96 Sep 1, 2026
52c054f
update player_audio_file_fragment.xml m3
alperozturk96 Sep 1, 2026
5ca353d
redesign re-use ui components
alperozturk96 Sep 1, 2026
c898257
fix crash playing audio after video
alperozturk96 Sep 1, 2026
f275fbc
use view pager 2
alperozturk96 Sep 1, 2026
867c697
use kotlinx.serialization instead of java.io
alperozturk96 Sep 1, 2026
690cb56
update dims
alperozturk96 Sep 1, 2026
4c7ef19
fix readCurrentFiles calls
alperozturk96 Sep 1, 2026
506f868
fix readCurrentFiles calls
alperozturk96 Sep 1, 2026
a473d3e
wip
alperozturk96 Sep 1, 2026
a2d40d0
wip
alperozturk96 Sep 1, 2026
3d8dae1
wip
alperozturk96 Sep 1, 2026
e8d5d3a
wip
alperozturk96 Sep 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ dependencies {

// region Kotlin
implementation(libs.kotlin.stdlib)
implementation(libs.kotlinx.coroutines.core)
implementation(libs.kotlinx.coroutines.guava)
// endregion

// region Stateless
Expand Down
5 changes: 5 additions & 0 deletions app/lint.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
<ignore path="build" />
</issue>

<!-- Dagger factories generated for media3 @UnstableApi types cannot carry an @OptIn annotation. -->
<issue id="UnsafeOptInUsageError" severity="error">
<ignore path="build" />
</issue>

<issue id="ObsoleteLintCustomCheck" severity="warning">
<ignore path="**/fragment-1.2.5/**/lint.jar" />
<ignore path="**/work-runtime-2.**/**/lint.jar" />
Expand Down
22 changes: 12 additions & 10 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,13 @@
android:exported="false"
android:theme="@style/Theme.ownCloud.Overlay" />
<activity
android:name=".ui.preview.PreviewMediaActivity"
android:configChanges="orientation|screenLayout|screenSize|keyboardHidden"
android:exported="false"
android:theme="@style/Theme.ownCloud.Media" />
android:name="com.nextcloud.client.player.ui.PlayerActivity"
android:configChanges="screenSize|smallestScreenSize|screenLayout|orientation"
android:launchMode="singleTask"
android:supportsPictureInPicture="true" />

<service
android:name="com.nextcloud.client.media.BackgroundPlayerService"
android:name="com.nextcloud.client.player.media3.PlaybackService"
android:exported="true"
android:foregroundServiceType="mediaPlayback"
tools:ignore="ExportedService">
Expand All @@ -402,6 +402,13 @@
</intent-filter>
</service>

<receiver android:name="androidx.media3.session.MediaButtonReceiver"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>

<service
android:name=".authentication.AccountAuthenticatorService"
android:exported="false">
Expand Down Expand Up @@ -555,11 +562,6 @@
android:name="com.nextcloud.client.jobs.transfer.FileTransferService"
android:exported="false"
android:foregroundServiceType="dataSync" />
<service
android:name="com.nextcloud.client.media.PlayerService"
android:exported="false"
android:foregroundServiceType="mediaPlayback" />

<activity
android:name=".ui.activity.PassCodeActivity"
android:exported="false"
Expand Down
11 changes: 11 additions & 0 deletions app/src/main/java/com/nextcloud/client/database/dao/FileDao.kt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,17 @@ interface FileDao {
)
suspend fun getFavoriteFiles(fileOwner: String): List<FileEntity>

@Query(
"""
SELECT *
FROM filelist
WHERE file_owner = :fileOwner
AND favorite = 1
ORDER BY ${ProviderTableMeta.FILE_DEFAULT_SORT_ORDER}
"""
)
fun getFavoriteFilesNonBlocking(fileOwner: String): List<FileEntity>

@Query("SELECT remote_id FROM filelist WHERE file_owner = :accountName AND remote_id IS NOT NULL")
fun getAllRemoteIds(accountName: String): List<String>

Expand Down
88 changes: 0 additions & 88 deletions app/src/main/java/com/nextcloud/client/di/AppComponent.java

This file was deleted.

78 changes: 78 additions & 0 deletions app/src/main/java/com/nextcloud/client/di/AppComponent.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
/*
* Nextcloud - Android Client
*
* SPDX-FileCopyrightText: 2019 Chris Narkiewicz <hello@ezaquarii.com>
* SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
*/
package com.nextcloud.client.di

import android.app.Application
import com.nextcloud.appReview.InAppReviewModule
import com.nextcloud.client.appinfo.AppInfoModule
import com.nextcloud.client.database.DatabaseModule
import com.nextcloud.client.device.DeviceModule
import com.nextcloud.client.integrations.IntegrationsModule
import com.nextcloud.client.jobs.JobsModule
import com.nextcloud.client.jobs.download.FileDownloadHelper
import com.nextcloud.client.jobs.folderDownload.FolderDownloadWorkerReceiver
import com.nextcloud.client.jobs.offlineOperations.receiver.OfflineOperationReceiver
import com.nextcloud.client.jobs.upload.FileUploadBroadcastReceiver
import com.nextcloud.client.jobs.upload.FileUploadHelper
import com.nextcloud.client.network.NetworkModule
import com.nextcloud.client.onboarding.OnboardingModule
import com.nextcloud.client.player.PlayerModule
import com.nextcloud.client.preferences.PreferencesModule
import com.owncloud.android.MainApp
import com.owncloud.android.ui.ThemeableSwitchPreference
import com.owncloud.android.ui.whatsnew.ProgressIndicator
import dagger.BindsInstance
import dagger.Component
import dagger.android.support.AndroidSupportInjectionModule
import javax.inject.Singleton

@Component(
modules = [
AndroidSupportInjectionModule::class,
AppModule::class,
PreferencesModule::class,
AppInfoModule::class,
NetworkModule::class,
DeviceModule::class,
OnboardingModule::class,
ViewModelModule::class,
JobsModule::class,
IntegrationsModule::class,
InAppReviewModule::class,
ThemeModule::class,
DatabaseModule::class,
DispatcherModule::class,
VariantModule::class,
PlayerModule::class
]
)
@Singleton
interface AppComponent {
fun inject(app: MainApp)

fun inject(switchPreference: ThemeableSwitchPreference)

fun inject(fileUploadHelper: FileUploadHelper)

fun inject(fileDownloadHelper: FileDownloadHelper)

fun inject(progressIndicator: ProgressIndicator)

fun inject(fileUploadBroadcastReceiver: FileUploadBroadcastReceiver)

fun inject(offlineOperationReceiver: OfflineOperationReceiver)

fun inject(folderDownloadWorkerReceiver: FolderDownloadWorkerReceiver)

@Component.Builder
interface Builder {
@BindsInstance
fun application(application: Application): Builder

fun build(): AppComponent
}
}
20 changes: 4 additions & 16 deletions app/src/main/java/com/nextcloud/client/di/ComponentsModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@
import com.nextcloud.client.jobs.upload.FileUploadHelper;
import com.nextcloud.client.logger.ui.LogsActivity;
import com.nextcloud.client.logger.ui.LogsViewModel;
import com.nextcloud.client.media.BackgroundPlayerService;
import com.nextcloud.client.media.PlayerService;
import com.nextcloud.client.migrations.Migrations;
import com.nextcloud.client.onboarding.FirstRunActivity;
import com.nextcloud.client.onboarding.WhatsNewActivity;
Expand Down Expand Up @@ -122,8 +120,7 @@
import com.owncloud.android.ui.preview.PreviewBitmapActivity;
import com.owncloud.android.ui.preview.PreviewImageActivity;
import com.owncloud.android.ui.preview.PreviewImageFragment;
import com.owncloud.android.ui.preview.PreviewMediaActivity;
import com.owncloud.android.ui.preview.PreviewMediaFragment;
import com.owncloud.android.ui.preview.PreviewPlaybackFragment;
import com.owncloud.android.ui.preview.PreviewTextFileFragment;
import com.owncloud.android.ui.preview.PreviewTextFragment;
import com.owncloud.android.ui.preview.PreviewTextStringFragment;
Expand Down Expand Up @@ -206,9 +203,6 @@ abstract class ComponentsModule {
@ContributesAndroidInjector
abstract PreviewImageActivity previewImageActivity();

@ContributesAndroidInjector
abstract PreviewMediaActivity previewMediaActivity();

@ContributesAndroidInjector
abstract ReceiveExternalFilesActivity receiveExternalFilesActivity();

Expand Down Expand Up @@ -290,9 +284,6 @@ abstract class ComponentsModule {
@ContributesAndroidInjector
abstract BackupListFragment chooseContactListFragment();

@ContributesAndroidInjector
abstract PreviewMediaFragment previewMediaFragment();

@ContributesAndroidInjector
abstract PreviewTextFragment previewTextFragment();

Expand All @@ -302,6 +293,9 @@ abstract class ComponentsModule {
@ContributesAndroidInjector
abstract SetOnlineStatusBottomSheet setOnlineStatusBottomSheet();

@ContributesAndroidInjector
abstract PreviewPlaybackFragment previewPlaybackFragment();

@ContributesAndroidInjector
abstract PreviewTextFileFragment previewTextFileFragment();

Expand Down Expand Up @@ -344,9 +338,6 @@ abstract class ComponentsModule {
@ContributesAndroidInjector
abstract OperationsService operationsService();

@ContributesAndroidInjector
abstract PlayerService playerService();

@ContributesAndroidInjector
abstract FileTransferService fileDownloaderService();

Expand Down Expand Up @@ -498,9 +489,6 @@ abstract class ComponentsModule {
abstract InternalTwoWaySyncActivity internalTwoWaySyncActivity();

@OptIn(markerClass = UnstableApi.class)
@ContributesAndroidInjector
abstract BackgroundPlayerService backgroundPlayerService();

@ContributesAndroidInjector
abstract TermsOfServiceDialog termsOfServiceDialog();

Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/com/nextcloud/client/di/ViewModelModule.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import androidx.lifecycle.ViewModelProvider
import com.nextcloud.client.documentscan.DocumentScanViewModel
import com.nextcloud.client.etm.EtmViewModel
import com.nextcloud.client.logger.ui.LogsViewModel
import com.nextcloud.client.player.ui.PlayerViewModel
import com.nextcloud.ui.fileactions.FileActionsViewModel
import com.owncloud.android.ui.preview.pdf.PreviewPdfViewModel
import com.nextcloud.ui.trashbinFileActions.TrashbinFileActionsViewModel
Expand Down Expand Up @@ -57,6 +58,11 @@ abstract class ViewModelModule {
@ViewModelKey(TrashbinFileActionsViewModel::class)
abstract fun trashbinFileActionsViewModel(vm: TrashbinFileActionsViewModel): ViewModel

@Binds
@IntoMap
@ViewModelKey(PlayerViewModel::class)
abstract fun playerViewModel(vm: PlayerViewModel): ViewModel

@Binds
abstract fun bindViewModelFactory(factory: ViewModelFactory): ViewModelProvider.Factory
}
31 changes: 0 additions & 31 deletions app/src/main/java/com/nextcloud/client/media/AudioFocus.kt

This file was deleted.

Loading
Loading