Skip to content

This is a simple YouTube Shorts Clone in Native Android using kotlin

Notifications You must be signed in to change notification settings

josephalx/Youtube-Shorts-Clone

Repository files navigation

Youtube-Shorts-Clone

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

Table of Contents

  1. Setup. Install IDE
  2. Build. Create apk
  3. ProGuard
  4. Screenshots
  5. Credits

Setup

Starting from base project

  1. git clone https://github.com/josephalx/Youtube-Shorts-Clone.git
  2. cd Youtube-Shorts-Clone

IDE

  1. Download latest Android Studio from https://developer.android.com/studio/index.html
  2. Follow Android Studio installation instruction.
  3. Download and install latest JDK 11 https://www.openlogic.com/openjdk-downloads.
  4. Open Android Studio - Open Existing Android Project - find folder with project and click OK
  5. Wait a while. Follow Android Studio instructions to install missing items.
  6. Press cmd + shift + a and type AVD Manager and press Enter.
  7. Press Create Virtual Device... button.
  8. Select Pixel 6
  9. Select latest API level (in case if latest is not available then click Download and wait, it's going to take a while).
  10. Click Next
  11. Click Finish

Building

Create APK

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)

Install

To install app on emulator or connected real device:

$ ./gradlew installDebug

ProGuard

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.

Screenshots

Credits

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.