Skip to content

dmitrilc/FreeMediaPlayer

Repository files navigation

FreeMediaPlayer

A free media player for Android. This app can play both audio and video files.

This is a work in progress. Any contribution or feedback would be greatly appreciated.

Screens

First Screens 2nd Screen screen 4

Features

Permission Popup

Bottom Navigation

Bottom.Nav.mp4

Sort files based on media type

Folders.Screen.mp4

Files Browser

Files.Browser.mp4

Music Player

Music.Player.mp4

Portrait Video Player

Video.Player.mp4

Landscaped Video Player

Landscaped.Video.Player.mp4

Active Playlist drag-and-drop to re-order

Active.Playlist.Reorder.mp4

Active Playlist swipe-to-remove

Active.Playlist.Swipe.mp4

Media Controller in Notification

Notification.Media.Controller.mp4

Media Controller with home screen widget

Widget.Media.Controller.mp4

Dark and Light mode switch

Dark.Light.Mode.switch.mp4

Dynamic Colors theme

Dynamic.Colors.theme.mp4

Technical Stuff

Project Structure

data: All classes belonging to the data layer should go here. The types of class in this package are Repository, Repository Manager, DataSource, Room classes (Dao, @Entity, Database, etc.), DataStore, Worker, etc.

domain: All UseCase classes should go here.

hilt: All Hilt configuration classes such as Module should go here.

service: All services should go here.

ui: All Activity, Fragment, ViewModel, or Widget should go here.

Architecture

  1. The app heavily follows Google's guide to app achitecture https://developer.android.com/topic/architecture?hl=en. All of the layers are separated.
  2. For the Audio and Video players, the app also use the Google guide to Media app architecture https://developer.android.com/guide/topics/media-apps/media-apps-overview.
  3. Media files and metadata relies on Android's MediaStore.

UI architecture

  1. For simple screens, databinding and simple callbacks are used.
  2. For complicated screens with lots of actions, such as the Video player, MVI is used to model user actions AND actions coming from the data layer.

Theming

The app heavily relies on Material 3 for theming purposes.

Testing

I try my best to provide adequate Unit and instrumented tests if I have time.