Add Android TV sample app#2697
Conversation
3a8cf6d to
46f08b2
Compare
| "glideOkHttp3", | ||
| ] | ||
|
|
||
| exoplayer = [ |
There was a problem hiding this comment.
As far as I know, exoplayer is deprecated, shouldn't we use androidx-media3 to have a better test case?
There was a problem hiding this comment.
This is a cherry-pick of a sample app made a while back. It might take too long to upgrade to media3 although you're right it would be nice to do eventually
| implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1") | ||
| implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1") | ||
| implementation("androidx.navigation:navigation-fragment-ktx:2.5.2") | ||
| implementation("androidx.navigation:navigation-ui-ktx:2.5.2") |
There was a problem hiding this comment.
Minor: maybe put them into libs.versions.toml
| } | ||
|
|
||
| @Suppress("UnstableApiUsage") | ||
| fun ApplicationDefaultConfig.configureFlavorForTvApp( |
There was a problem hiding this comment.
can we simply reuse config and method for the sample app? Or we don't want create flavors for TV app?
There was a problem hiding this comment.
Using flavors won't work as the UI and logic is completely different.
Reusing the config means mixing data from different apps in the same RUM App (so even if apps can share a client token, they have a different Application ID)
| kotlin("android") | ||
| kotlin("kapt") | ||
| id("com.github.ben-manes.versions") | ||
| id("org.jetbrains.dokka") |
There was a problem hiding this comment.
probably this one is not needed? we have it by some reason also in the sample app buildscript 🤔
| plugins { | ||
| id("com.android.application") | ||
| kotlin("android") | ||
| kotlin("kapt") |
There was a problem hiding this comment.
This is not needed, because there is no kapt processing here. Same for the KSP plugin below.
|
|
||
| // Video | ||
| implementation(libs.bundles.exoplayer) | ||
| implementation("com.github.TeamNewPipe.NewPipeExtractor:extractor:v0.24.6") |
There was a problem hiding this comment.
I think it is better to move this to libs.versions.toml
| } | ||
| } | ||
| junitConfig() | ||
| javadocConfig() |
| Thread { | ||
| loadAndPlayVideo(intentUri) | ||
| }.start() |
There was a problem hiding this comment.
maybe this (and in other similar places) is a good use-case for Kotlin Coroutines in this app
| ) | ||
| ) | ||
| ) | ||
| // .addInterceptor { |
| } | ||
|
|
||
| val body = response.body | ||
| var responseBodyToReturn: String? = null |
There was a problem hiding this comment.
minor: we can make it val responseBodyToReturn = response.body?.let { it.string() }
| android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z" | ||
| android:strokeWidth="1" | ||
| android:strokeColor="#00000000" /> | ||
| </vector> No newline at end of file |
There was a problem hiding this comment.
| </vector> | |
| </vector> | |
| android:layout_width="match_parent" | ||
| android:layout_height="match_parent"/> | ||
|
|
||
| </androidx.constraintlayout.widget.ConstraintLayout> No newline at end of file |
There was a problem hiding this comment.
| </androidx.constraintlayout.widget.ConstraintLayout> | |
| </androidx.constraintlayout.widget.ConstraintLayout> | |
minor: this missing newline at EOF can be applied to multiple files
46f08b2 to
94cf708
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2697 +/- ##
===========================================
+ Coverage 69.95% 69.95% +0.01%
===========================================
Files 822 822
Lines 30693 30693
Branches 5170 5170
===========================================
+ Hits 21469 21471 +2
- Misses 7775 7778 +3
+ Partials 1449 1444 -5 🚀 New features to boost your workflow:
|
94cf708 to
08e7f0d
Compare
What does this PR do?
Add an Android TV sample app :
Motivation
Provide a sample app showcasing RUM features on an Android TV app.