This file documents the modifications made for the Android Auto interface. These modifications must be re-applied when the developer releases an update.
These modifications:
- Add a "Feed" category to the Android Auto main menu
- Filter Feed content (excludes upcoming/coming soon content)
- Change application name to "Q-Tube"
- Remove donation menu from About page
Changes:
- Added
ID_FEEDconstant
Added code (line 11):
internal const val ID_FEED = "feed"Added imports:
import org.schabi.newpipe.local.feed.FeedDatabaseManagerAdded field:
private val feedDatabaseManager = FeedDatabaseManager(context)New code:
private fun populateFeed(): Single<List<MediaBrowserCompat.MediaItem>> {
return feedDatabaseManager.getStreams(
FeedGroupEntity.GROUP_ALL_ID,
false, // includePlayedStreams
false, // includePartiallyPlayedStreams
false // includeFutureStreams - false to exclude upcoming/coming soon content
).toSingle().map { streamWithStateList ->
streamWithStateList.map { streamWithState ->
createStreamMediaItem(
streamWithState.stream.uid,
streamWithState.stream.title,
streamWithState.stream.uploader,
streamWithState.stream.thumbnailUrl,
streamWithState.stream.url,
streamWithState.stream.serviceId
)
}
}
}Note: This change filters "upcoming/coming soon" content, just like the phone app.
New code:
if (path.isEmpty()) {
return Single.just(
listOf(
createRootMediaItem(
ID_FEED,
context.resources.getString(R.string.fragment_feed_title),
R.drawable.ic_subscriptions
),
createRootMediaItem(
ID_BOOKMARKS,
context.resources.getString(R.string.tab_bookmarks_short),
R.drawable.ic_bookmark_white
),
createRootMediaItem(
ID_HISTORY,
context.resources.getString(R.string.action_history),
R.drawable.ic_history_white
)
)
)
}| File | Change Type | Description |
|---|---|---|
| MediaBrowserCommon.kt | Addition | ID_FEED constant |
| MediaBrowserImpl.kt | Import | FeedDatabaseManager import |
| MediaBrowserImpl.kt | Field | feedDatabaseManager instance |
| MediaBrowserImpl.kt | Method | populateFeed() - Filtering using FeedDatabaseManager |
| MediaBrowserImpl.kt | Menu | Feed, Bookmarks, History - Subscriptions removed |
| build.gradle.kts | Modification | Application name changed to "Q-Tube" |
| strings.xml | Global | Rebranded all "Tubular/NewPipe/Yutup" occurrences to "Q-Tube" |
| Source Code | Global | Updated class titles and metadata to "Q-Tube" |
| fragment_about.xml | Removal | Donation section removed |
| AboutActivity.kt | Removal | Donation link code removed |
To build the APK after making the changes:
./gradlew assembleDebugBuilt APK: app/build/outputs/apk/debug/app-debug.apk
-
Feed Filtering: The
includeFutureStreams=falseparameter prevents upcoming (not yet released) content from being displayed. This is consistent behavior with the phone app. -
Menu Structure: In Android Auto, the following menus are available:
- Feed: Videos from subscriptions (filtered)
- Bookmarks: Saved playlists
- History: Watch history
-
Subscriptions: This menu was removed because loading channel content over the network was problematic. Feed already shows videos from subscriptions.