Giter Site home page Giter Site logo

mahmedmostafa / mediaapp-exoplayer-mediabrowserservice-slidinguppanel- Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 1.0 235 KB

Audio Player app that caches and plays music in the background with clean code organization

Java 100.00%
mvc exoplayer slidinguppanel forground-service download-manager sharedpreferences mediabrowserservice mediacontroller

mediaapp-exoplayer-mediabrowserservice-slidinguppanel-'s Introduction

MediaApp

(Music Streaming App) : An Android app that provides some audio media to play stored in firestore , the user can select more than room each has different playlist of songs and records , and can play the media in offline mode cached in the device (MVC , ExoPlayer , MediaBrowserService , MediaSessionCompat , MediaControllerCompat , Cachin with SharedPrefrences & ExoPlayer Cache data source , SlidingUpPanel , NaviagtionDrawer , Forground Service with notification and finally DownloadManager Service)

mediaapp-exoplayer-mediabrowserservice-slidinguppanel-'s People

Contributors

mahmedmostafa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

teamnovo

mediaapp-exoplayer-mediabrowserservice-slidinguppanel-'s Issues

Crashes when closing the App while audio is playing

Steps to reproduce

  1. Play audio
  2. Close App from task menu

Error Log

java.lang.NullPointerException: Attempt to invoke virtual method 'long com.google.android.exoplayer2.SimpleExoPlayer.getContentPosition()' on a null object reference
    at com.thealien.myaudioplayer.player.MediaPlayerAdapter$1.run(MediaPlayerAdapter.java:188)

Fix

//the getDuration method returns a negative one when the audio is stopped
// add this condition at line 188 in MediaPlayerAdapter.java
if (exoPlayer != null && exoPlayer.getContentPosition() >= exoPlayer.getDuration() && exoPlayer.getDuration() > 0) {
    playbackInfoListener.onPlaybackComplete();
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.