This is sample application in native android using Kotkin inspired from YouTube Shorts.
- RecyclerView and ViewPager2 used to display lists of video.
- Retrofit was used to get data from the backend URL.
- ViewModel was created to share the data between the fragments.
- Exoplayer 3 was used to play video in a continous fashion.
- SimpleCache is used to cache previously played videos to enable seemless playback
git clone https://github.com/josephalx/Youtube-Shorts-Clone.git
cd Youtube-Shorts-Clone
- Download latest Android Studio from https://developer.android.com/studio/index.html
- Follow Android Studio installation instruction.
- Download and install latest JDK 11 https://www.openlogic.com/openjdk-downloads.
- Open Android Studio - Open Existing Android Project - find folder with project and click
OK
- Wait a while. Follow Android Studio instructions to install missing items.
- Press
cmd + shift + a
and typeAVD Manager
and press Enter. - Press
Create Virtual Device...
button. - Select
Pixel 6
- Select latest API level (in case if latest is not available then click
Download
and wait, it's going to take a while). - Click
Next
- Click
Finish
After you complete the Gradle
project configuration, you can use gradlew
executable to build the APK:
$ ./gradlew assembleDebug // to build a debug APK
$ ./gradlew assembleRelease // to build a release signed APK, can upload to Market
Or use Android Studio build tool build >> Build Bundle(s)/APK(s) >> Build APK(s)
To install app on emulator or connected real device:
$ ./gradlew installDebug
Project already has proguard config for included libraries.
Maintain proguard-rules.pro updated when you add new libraries or play with reflection.
When you add new library or check out its Proguard section and add rules to proguard-rules.pro
.
When you add code which uses reflection add rules to proguard-rules.pro
.
This YouTube Shorts Clone app is maintianed by Joseph Alex Chakola. The open API from Gro.care was used to obtain videos for this app.