Giter Site home page Giter Site logo

mitchtabian / spotify-clone Goto Github PK

View Code? Open in Web Editor NEW
137.0 9.0 70.0 290 KB

Audio streaming application with MediaBrowserServiceCompat, ExoPlayer and Firestore

Home Page: https://codingwithmitch.com/courses/android-audio-streaming/

Java 100.00%
android-audio-player exoplayer mediabrowserservicecompat android-spotify-clone

spotify-clone's Introduction

In this course I teach you the current best practice way to build an audio streaming application on android. To make it more interesting, I designed it to look similar to the popular music streaming app called Spotify. View screen shots.

I use the ExoPlayer library for streaming the audio files. The audio files are located online in a Firebase Firestore database.

Here's what you will see in the course:

  • Every line of code is written and explained on video
  • ExoPlayer (same media library used by YouTube in the mobile app)
  • Streaming audio files from the internet (Firestore)
  • Playlists
  • Effective fragment management
  • AsyncTasks
  • SharedPreferences
  • Effective communication with interfaces
  • Services (a class specifically built to stream media files)
  • Background Services that run forever
  • Notifications
  • Controlling playback through a notification
  • Notifications and the lock screen
  • Broadcast Receivers
  • Glide library to download bitmaps
  • RecyclerViews
  • And much more...

spotify-clone's People

Contributors

mitchtabian avatar prokash-sarkar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spotify-clone's Issues

Firestore Database structure

Can you tell what is the structure of your Firestore database and how are you linking the files from storage with the database information?

Activity survive configuration changes but not survive killing by the system

Activity survive configuration changes but not survive killing by the system for example when the app was long time in background.

To simulate this issue enable "don't keep activities"
Developer options > don't keep activities

  1. Enter the app click on one of the categories
  2. Press home button
  3. Enter the app again and click on artist

The app will crash.

Will be nice to see some advanced video on this complicate and confusing topic (ConfigurationChange, LowMemory, State loss) :)

App Crash: getTag Null Object reference

Caused often when pressed home button i.e leaving the app and then coming back to it.

Refer master branch.

for(Fragment f: MainActivityFragmentManager.getInstance().getFragments()){
        if(f != null ){
            if(!f.getTag().equals(fragment.getTag())){
                FragmentTransaction t = getSupportFragmentManager().beginTransaction();
                t.hide(f);
                t.commit();
            }
        }
    }

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.codingwithmitch.audiostreamer/com.codingwithmitch.audiostreamer.ui.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference

 `Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference
    at com.codingwithmitch.audiostreamer.ui.MainActivity.showFragment(MainActivity.java:380)
    at com.codingwithmitch.audiostreamer.ui.MainActivity.loadFragment(MainActivity.java:363)
    at com.codingwithmitch.audiostreamer.ui.MainActivity.onCreate(MainActivity.java:80)`

APP CRASHING AFTER NOTIFICATION APPEARS

its an stack trace , and actually its causing on samsung devices too , am using huawei devices

android.app.RemoteServiceException: Bad notification posted from package downloader.shayan.free.music: Couldn't expand RemoteViews for: StatusBarNotification(pkg=downloader.shayan.free.music user=UserHandle{0} id=201 tag=null score=0 key=0|com.mp3.downloader.shayan.free.music|201|null|10131: Notification(pri=0 contentView=com.mp3.downloader.shayan.free.music/0x109007f vibrate=null sound=null defaults=0x0 flags=0x62 color=0x00000000 category=transport actions=3 vis=PUBLIC))

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.