Search in sources :

Example 16 with Song

use of com.simplecity.amp_library.model.Song in project Shuttle by timusus.

the class MusicService method notifyChange.

private void notifyChange(String what, boolean fromUser) {
    if (what.equals(InternalIntents.TRACK_ENDING)) {
        //We're just about to change tracks, so 'current song' is the song that just finished
        Song finishedSong = currentSong;
        if (finishedSong != null) {
            if (finishedSong.hasPlayed()) {
                Observable.fromCallable(() -> {
                    ShuttleUtils.incrementPlayCount(this, finishedSong);
                    return null;
                }).subscribeOn(Schedulers.io()).subscribe();
            }
            scrobbleBroadcast(Status.COMPLETE, finishedSong);
        }
        return;
    }
    updateMediaSession(what);
    if (what.equals(InternalIntents.POSITION_CHANGED)) {
        return;
    }
    getExtras(fromUser).subscribeOn(Schedulers.io()).subscribe(extras -> {
        final Intent intent = new Intent(what);
        intent.putExtras(extras);
        sendBroadcast(intent);
    });
    //Tasker intent
    Intent taskerIntent = new Intent(ExternalIntents.TASKER);
    //Pebble intent
    Intent pebbleIntent = new Intent(ExternalIntents.PEBBLE);
    pebbleIntent.putExtra("artist", getArtistName());
    pebbleIntent.putExtra("album", getAlbumName());
    pebbleIntent.putExtra("track", getSongName());
    if (what.equals(InternalIntents.PLAY_STATE_CHANGED)) {
        updateNotification();
        // Bluetooth intent
        getExtras(fromUser).subscribeOn(Schedulers.io()).subscribe(extras -> {
            final Intent intent = new Intent(ExternalIntents.AVRCP_PLAY_STATE_CHANGED);
            intent.putExtras(extras);
            sendBroadcast(intent);
        });
        if (isPlaying()) {
            if (currentSong != null) {
                currentSong.setResumed();
            }
            //Last.fm scrobbler intent
            scrobbleBroadcast(Status.RESUME, currentSong);
            //Tasker intent
            taskerIntent.putExtra("%MTRACK", getSongName());
            //Pebble intent
            sendBroadcast(pebbleIntent);
        } else {
            if (currentSong != null) {
                currentSong.setPaused();
            }
            //Last.fm scrobbler intent
            scrobbleBroadcast(Status.PAUSE, currentSong);
            //Tasker intent
            taskerIntent.putExtra("%MTRACK", "");
        }
        sendBroadcast(taskerIntent);
    } else if (what.equals(InternalIntents.META_CHANGED)) {
        if (currentSong != null) {
            currentSong.setStartTime();
        }
        //Tasker intent
        taskerIntent.putExtra("%MTRACK", getSongName());
        sendBroadcast(taskerIntent);
        //Bluetooth intent
        getExtras(fromUser).subscribeOn(Schedulers.io()).subscribe(extras -> {
            final Intent intent = new Intent(ExternalIntents.AVRCP_META_CHANGED);
            intent.putExtras(extras);
            sendBroadcast(intent);
        });
        //Pebble intent
        sendBroadcast(pebbleIntent);
        //Last.fm scrobbler intent
        scrobbleBroadcast(Status.START, currentSong);
    }
    if (what.equals(InternalIntents.QUEUE_CHANGED)) {
        saveQueue(true);
        if (isPlaying()) {
            setNextTrack();
        }
    } else {
        saveQueue(false);
    }
    mWidgetProviderLarge.notifyChange(MusicService.this, what);
    mWidgetProviderMedium.notifyChange(MusicService.this, what);
    mWidgetProviderSmall.notifyChange(MusicService.this, what);
    mWidgetProviderExtraLarge.notifyChange(MusicService.this, what);
}
Also used : R(com.simplecity.amp_library.R) WidgetProviderSmall(com.simplecity.amp_library.ui.widgets.WidgetProviderSmall) Bundle(android.os.Bundle) WebImage(com.google.android.gms.common.images.WebImage) PackageManager(android.content.pm.PackageManager) CrashlyticsCore(com.crashlytics.android.core.CrashlyticsCore) PlaylistUtils(com.simplecity.amp_library.utils.PlaylistUtils) Uri(android.net.Uri) AndroidSchedulers(rx.android.schedulers.AndroidSchedulers) Random(java.util.Random) PendingIntent(android.app.PendingIntent) MediaSessionCompat(android.support.v4.media.session.MediaSessionCompat) Action1(rx.functions.Action1) Drawable(android.graphics.drawable.Drawable) IBinder(android.os.IBinder) WakeLock(android.os.PowerManager.WakeLock) Song(com.simplecity.amp_library.model.Song) Manifest(android.Manifest) SQLiteException(android.database.sqlite.SQLiteException) PowerManager(android.os.PowerManager) MediaMetadataCompat(android.support.v4.media.MediaMetadataCompat) Handler(android.os.Handler) Looper(android.os.Looper) MediaStore(android.provider.MediaStore) Map(java.util.Map) Schedulers(rx.schedulers.Schedulers) PreferenceManager(android.preference.PreferenceManager) PlaybackStateCompat(android.support.v4.media.session.PlaybackStateCompat) Log(android.util.Log) WidgetProviderLarge(com.simplecity.amp_library.ui.widgets.WidgetProviderLarge) RemoteViews(android.widget.RemoteViews) SimpleTarget(com.bumptech.glide.request.target.SimpleTarget) NotificationManager(android.app.NotificationManager) Service(android.app.Service) IntentFilter(android.content.IntentFilter) ContextCompat(android.support.v4.content.ContextCompat) MediaStatus(com.google.android.gms.cast.MediaStatus) MediaButtonIntentReceiver(com.simplecity.amp_library.utils.MediaButtonIntentReceiver) NoConnectionException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.NoConnectionException) BuildConfig(com.simplecity.amp_library.BuildConfig) VideoCastManager(com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager) BroadcastReceiver(android.content.BroadcastReceiver) SettingsManager(com.simplecity.amp_library.utils.SettingsManager) List(java.util.List) Action0(rx.functions.Action0) WidgetProviderMedium(com.simplecity.amp_library.ui.widgets.WidgetProviderMedium) Notification(android.app.Notification) GlideUtils(com.simplecity.amp_library.glide.utils.GlideUtils) ContentValues(android.content.ContentValues) Nullable(android.support.annotation.Nullable) BluetoothDevice(android.bluetooth.BluetoothDevice) Context(android.content.Context) Album(com.simplecity.amp_library.model.Album) Stream(com.annimon.stream.Stream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) DrawableUtils(com.simplecity.amp_library.utils.DrawableUtils) Intent(android.content.Intent) SystemClock(android.os.SystemClock) AudioManager(android.media.AudioManager) ApplicationMetadata(com.google.android.gms.cast.ApplicationMetadata) HttpServer(com.simplecity.amp_library.http.HttpServer) ArrayList(java.util.ArrayList) Observable(rx.Observable) GlideAnimation(com.bumptech.glide.request.animation.GlideAnimation) SuppressLint(android.annotation.SuppressLint) BluetoothHeadset(android.bluetooth.BluetoothHeadset) Toast(android.widget.Toast) DiskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy) BluetoothA2dp(android.bluetooth.BluetoothA2dp) Build(android.os.Build) VideoCastConsumerImpl(com.google.android.libraries.cast.companionlibrary.cast.callbacks.VideoCastConsumerImpl) ShuttleUtils(com.simplecity.amp_library.utils.ShuttleUtils) TransientNetworkDisconnectionException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.TransientNetworkDisconnectionException) EqualizerService(com.simplecity.amp_library.services.EqualizerService) Collectors(com.annimon.stream.Collectors) AlarmManager(android.app.AlarmManager) WidgetProviderExtraLarge(com.simplecity.amp_library.ui.widgets.WidgetProviderExtraLarge) ComponentName(android.content.ComponentName) MediaInfo(com.google.android.gms.cast.MediaInfo) TextUtils(android.text.TextUtils) CastException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.CastException) AppWidgetManager(android.appwidget.AppWidgetManager) RemoteControlClient(android.media.RemoteControlClient) Glide(com.bumptech.glide.Glide) SharedPreferences(android.content.SharedPreferences) TreeMap(java.util.TreeMap) HandlerThread(android.os.HandlerThread) Bitmap(android.graphics.Bitmap) Crashlytics(com.crashlytics.android.Crashlytics) DataManager(com.simplecity.amp_library.utils.DataManager) OnAudioFocusChangeListener(android.media.AudioManager.OnAudioFocusChangeListener) Predicate(com.annimon.stream.function.Predicate) MediaMetadata(com.google.android.gms.cast.MediaMetadata) Collections(java.util.Collections) ContentUris(android.content.ContentUris) Song(com.simplecity.amp_library.model.Song) PendingIntent(android.app.PendingIntent) Intent(android.content.Intent)

Example 17 with Song

use of com.simplecity.amp_library.model.Song in project Shuttle by timusus.

the class MusicService method openFile.

/**
     * Opens a file and prepares it for playback
     *
     * @param path The path of the file to open
     */
public void openFile(String path, @Nullable Action0 completion) {
    synchronized (this) {
        if (path == null) {
            return;
        }
        Uri uri = Uri.parse(path);
        long id = -1;
        try {
            id = Long.valueOf(uri.getLastPathSegment());
        } catch (NumberFormatException ignored) {
        }
        Predicate<Song> predicate;
        long finalId = id;
        if (finalId != -1 && (path.startsWith(MediaStore.Audio.Media.EXTERNAL_CONTENT_URI.toString()) || path.startsWith(MediaStore.Files.getContentUri("external").toString()))) {
            predicate = song -> song.id == finalId;
        } else {
            if (uri != null && path.startsWith("content://")) {
                path = uri.getPath();
            }
            String finalPath = path;
            predicate = song -> song.path.contains(finalPath);
        }
        DataManager.getInstance().getSongsRelay().first().map(songs -> Stream.of(songs).filter(predicate).collect(Collectors.toList())).subscribe(songs -> {
            if (!songs.isEmpty()) {
                currentSong = songs.get(0);
                open(currentSong);
                if (completion != null) {
                    completion.call();
                }
            }
        });
    }
}
Also used : R(com.simplecity.amp_library.R) WidgetProviderSmall(com.simplecity.amp_library.ui.widgets.WidgetProviderSmall) Bundle(android.os.Bundle) WebImage(com.google.android.gms.common.images.WebImage) PackageManager(android.content.pm.PackageManager) CrashlyticsCore(com.crashlytics.android.core.CrashlyticsCore) PlaylistUtils(com.simplecity.amp_library.utils.PlaylistUtils) Uri(android.net.Uri) AndroidSchedulers(rx.android.schedulers.AndroidSchedulers) Random(java.util.Random) PendingIntent(android.app.PendingIntent) MediaSessionCompat(android.support.v4.media.session.MediaSessionCompat) Action1(rx.functions.Action1) Drawable(android.graphics.drawable.Drawable) IBinder(android.os.IBinder) WakeLock(android.os.PowerManager.WakeLock) Song(com.simplecity.amp_library.model.Song) Manifest(android.Manifest) SQLiteException(android.database.sqlite.SQLiteException) PowerManager(android.os.PowerManager) MediaMetadataCompat(android.support.v4.media.MediaMetadataCompat) Handler(android.os.Handler) Looper(android.os.Looper) MediaStore(android.provider.MediaStore) Map(java.util.Map) Schedulers(rx.schedulers.Schedulers) PreferenceManager(android.preference.PreferenceManager) PlaybackStateCompat(android.support.v4.media.session.PlaybackStateCompat) Log(android.util.Log) WidgetProviderLarge(com.simplecity.amp_library.ui.widgets.WidgetProviderLarge) RemoteViews(android.widget.RemoteViews) SimpleTarget(com.bumptech.glide.request.target.SimpleTarget) NotificationManager(android.app.NotificationManager) Service(android.app.Service) IntentFilter(android.content.IntentFilter) ContextCompat(android.support.v4.content.ContextCompat) MediaStatus(com.google.android.gms.cast.MediaStatus) MediaButtonIntentReceiver(com.simplecity.amp_library.utils.MediaButtonIntentReceiver) NoConnectionException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.NoConnectionException) BuildConfig(com.simplecity.amp_library.BuildConfig) VideoCastManager(com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager) BroadcastReceiver(android.content.BroadcastReceiver) SettingsManager(com.simplecity.amp_library.utils.SettingsManager) List(java.util.List) Action0(rx.functions.Action0) WidgetProviderMedium(com.simplecity.amp_library.ui.widgets.WidgetProviderMedium) Notification(android.app.Notification) GlideUtils(com.simplecity.amp_library.glide.utils.GlideUtils) ContentValues(android.content.ContentValues) Nullable(android.support.annotation.Nullable) BluetoothDevice(android.bluetooth.BluetoothDevice) Context(android.content.Context) Album(com.simplecity.amp_library.model.Album) Stream(com.annimon.stream.Stream) ByteArrayOutputStream(java.io.ByteArrayOutputStream) DrawableUtils(com.simplecity.amp_library.utils.DrawableUtils) Intent(android.content.Intent) SystemClock(android.os.SystemClock) AudioManager(android.media.AudioManager) ApplicationMetadata(com.google.android.gms.cast.ApplicationMetadata) HttpServer(com.simplecity.amp_library.http.HttpServer) ArrayList(java.util.ArrayList) Observable(rx.Observable) GlideAnimation(com.bumptech.glide.request.animation.GlideAnimation) SuppressLint(android.annotation.SuppressLint) BluetoothHeadset(android.bluetooth.BluetoothHeadset) Toast(android.widget.Toast) DiskCacheStrategy(com.bumptech.glide.load.engine.DiskCacheStrategy) BluetoothA2dp(android.bluetooth.BluetoothA2dp) Build(android.os.Build) VideoCastConsumerImpl(com.google.android.libraries.cast.companionlibrary.cast.callbacks.VideoCastConsumerImpl) ShuttleUtils(com.simplecity.amp_library.utils.ShuttleUtils) TransientNetworkDisconnectionException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.TransientNetworkDisconnectionException) EqualizerService(com.simplecity.amp_library.services.EqualizerService) Collectors(com.annimon.stream.Collectors) AlarmManager(android.app.AlarmManager) WidgetProviderExtraLarge(com.simplecity.amp_library.ui.widgets.WidgetProviderExtraLarge) ComponentName(android.content.ComponentName) MediaInfo(com.google.android.gms.cast.MediaInfo) TextUtils(android.text.TextUtils) CastException(com.google.android.libraries.cast.companionlibrary.cast.exceptions.CastException) AppWidgetManager(android.appwidget.AppWidgetManager) RemoteControlClient(android.media.RemoteControlClient) Glide(com.bumptech.glide.Glide) SharedPreferences(android.content.SharedPreferences) TreeMap(java.util.TreeMap) HandlerThread(android.os.HandlerThread) Bitmap(android.graphics.Bitmap) Crashlytics(com.crashlytics.android.Crashlytics) DataManager(com.simplecity.amp_library.utils.DataManager) OnAudioFocusChangeListener(android.media.AudioManager.OnAudioFocusChangeListener) Predicate(com.annimon.stream.function.Predicate) MediaMetadata(com.google.android.gms.cast.MediaMetadata) Collections(java.util.Collections) ContentUris(android.content.ContentUris) Song(com.simplecity.amp_library.model.Song) Uri(android.net.Uri)

Example 18 with Song

use of com.simplecity.amp_library.model.Song in project Shuttle by timusus.

the class MainActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    switch(item.getItemId()) {
        case R.id.action_search:
            Intent intent = new Intent(MainActivity.this, SearchActivity.class);
            intent.putExtra(SearchManager.QUERY, "");
            startActivityForResult(intent, REQUEST_SEARCH);
            return true;
        case EQUALIZER:
            final Intent equalizerIntent = new Intent(this, EqualizerActivity.class);
            startActivity(equalizerIntent);
            return true;
        case GO_TO_ARTIST:
            long time = System.currentTimeMillis();
            Album currentAlbum = MusicUtils.getAlbum();
            if (currentAlbum != null) {
                DataManager.getInstance().getAlbumArtistsRelay().first().flatMap(Observable::from).filter(albumArtist -> albumArtist.name.equals(currentAlbum.albumArtistName) && com.annimon.stream.Stream.of(albumArtist.albums).anyMatch(album -> album.id == currentAlbum.id)).observeOn(AndroidSchedulers.mainThread()).subscribe(albumArtist -> {
                    swapFragments(DetailFragment.newInstance(albumArtist), true);
                    new Handler().postDelayed(() -> mSlidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED, true), time - System.currentTimeMillis() + 250);
                });
            }
            return true;
        case GO_TO_ALBUM:
            time = System.currentTimeMillis();
            currentAlbum = MusicUtils.getAlbum();
            if (currentAlbum != null) {
                DataManager.getInstance().getAlbumsRelay().first().flatMap(Observable::from).filter(album -> album.id == currentAlbum.id).observeOn(AndroidSchedulers.mainThread()).subscribe(album -> {
                    swapFragments(DetailFragment.newInstance(album), true);
                    new Handler().postDelayed(() -> mSlidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED, true), time - System.currentTimeMillis() + 250);
                });
            }
            return true;
        case TIMER:
            SleepTimer.createTimer(this, MusicUtils.getTimerActive(), MusicUtils.getTimeRemaining());
            return true;
        case DELETE_ITEM:
            new DialogUtils.DeleteDialogBuilder().context(this).singleMessageId(R.string.delete_song_desc).multipleMessage(R.string.delete_song_desc_multiple).itemNames(Collections.singletonList(MusicUtils.getSongName())).songsToDelete(Observable.just(Collections.singletonList(MusicUtils.getSong()))).build().show();
            return true;
        case NEW_PLAYLIST:
            PlaylistUtils.createPlaylistDialog(this, MusicUtils.getQueue());
            return true;
        case PLAYLIST_SELECTED:
            List<Song> songs = MusicUtils.getQueue();
            Playlist playlist = (Playlist) item.getIntent().getSerializableExtra(ShuttleUtils.ARG_PLAYLIST);
            PlaylistUtils.addToPlaylist(this, playlist, songs);
            return true;
        case CLEAR_QUEUE:
            MusicUtils.clearQueue();
            intent = new Intent(this, MainActivity.class);
            intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            startActivity(intent);
            finish();
            return true;
        case TAGGER:
            TaggerDialog.newInstance(MusicUtils.getSong()).show(getSupportFragmentManager());
            return true;
        case VIEW_INFO:
            DialogUtils.showSongInfoDialog(this, MusicUtils.getSong());
            return true;
        case R.id.menu_favorite:
            PlaylistUtils.toggleFavorite(this);
            return true;
        case R.id.menu_share:
            DialogUtils.showShareDialog(MainActivity.this, MusicUtils.getSong());
            return true;
        case R.id.menu_queue:
            Fragment playingFragment = getSupportFragmentManager().findFragmentById(R.id.player_container);
            if (playingFragment != null) {
                ((PlayerFragment) playingFragment).toggleQueue();
            }
            return true;
        case android.R.id.home:
            playingFragment = getSupportFragmentManager().findFragmentById(R.id.player_container);
            if (playingFragment != null) {
                Fragment childFragment = playingFragment.getChildFragmentManager().findFragmentById(R.id.queue_container);
                if (childFragment != null && childFragment instanceof QueueFragment) {
                    ((PlayerFragment) playingFragment).toggleQueue();
                    toggleQueue(false);
                    return true;
                }
            }
            if (mSlidingUpPanelLayout != null) {
                if (mSlidingUpPanelLayout.getPanelState() != SlidingUpPanelLayout.PanelState.COLLAPSED && mSlidingUpPanelLayout.getPanelState() != SlidingUpPanelLayout.PanelState.HIDDEN) {
                    mSlidingUpPanelLayout.setPanelState(SlidingUpPanelLayout.PanelState.COLLAPSED, true);
                    return true;
                }
            }
            break;
    }
    return super.onOptionsItemSelected(item);
}
Also used : Album(com.simplecity.amp_library.model.Album) Handler(android.os.Handler) Intent(android.content.Intent) QueueFragment(com.simplecity.amp_library.ui.fragments.QueueFragment) FolderFragment(com.simplecity.amp_library.ui.fragments.FolderFragment) Fragment(android.support.v4.app.Fragment) QueuePagerFragment(com.simplecity.amp_library.ui.fragments.QueuePagerFragment) PlayerFragment(com.simplecity.amp_library.ui.fragments.PlayerFragment) QueueFragment(com.simplecity.amp_library.ui.fragments.QueueFragment) AlbumArtistFragment(com.simplecity.amp_library.ui.fragments.AlbumArtistFragment) NavigationDrawerFragment(com.simplecity.amp_library.ui.fragments.NavigationDrawerFragment) PlaylistFragment(com.simplecity.amp_library.ui.fragments.PlaylistFragment) GenreFragment(com.simplecity.amp_library.ui.fragments.GenreFragment) DetailFragment(com.simplecity.amp_library.ui.fragments.DetailFragment) SuggestedFragment(com.simplecity.amp_library.ui.fragments.SuggestedFragment) MainFragment(com.simplecity.amp_library.ui.fragments.MainFragment) AlbumFragment(com.simplecity.amp_library.ui.fragments.AlbumFragment) MiniPlayerFragment(com.simplecity.amp_library.ui.fragments.MiniPlayerFragment) DialogUtils(com.simplecity.amp_library.utils.DialogUtils) Song(com.simplecity.amp_library.model.Song) Playlist(com.simplecity.amp_library.model.Playlist) PlayerFragment(com.simplecity.amp_library.ui.fragments.PlayerFragment) MiniPlayerFragment(com.simplecity.amp_library.ui.fragments.MiniPlayerFragment)

Example 19 with Song

use of com.simplecity.amp_library.model.Song in project Shuttle by timusus.

the class MusicService method makeShuffleList.

public void makeShuffleList() {
    synchronized (this) {
        if (playlist == null || playlist.isEmpty()) {
            return;
        }
        shuffleList = new ArrayList<>(playlist);
        Song currentSong = null;
        if (playPos >= 0 && playPos < shuffleList.size()) {
            currentSong = shuffleList.remove(playPos);
        }
        Collections.shuffle(shuffleList);
        if (currentSong != null) {
            shuffleList.add(0, currentSong);
        }
        playPos = 0;
    }
}
Also used : Song(com.simplecity.amp_library.model.Song)

Example 20 with Song

use of com.simplecity.amp_library.model.Song in project Shuttle by timusus.

the class BlacklistHelper method addToBlacklist.

public static void addToBlacklist(List<Song> songs) {
    BriteDatabase db = DataManager.getInstance().getBlacklistDatabase();
    BriteDatabase.Transaction transaction = db.newTransaction();
    try {
        Stream.of(songs).map(song -> {
            ContentValues contentValues = new ContentValues();
            contentValues.put(BlacklistDbOpenHelper.COLUMN_SONG_ID, song.id);
            return contentValues;
        }).forEach(contentValues -> db.insert(BlacklistDbOpenHelper.TABLE_SONGS, contentValues));
        transaction.markSuccessful();
    } finally {
        transaction.end();
    }
}
Also used : BlacklistedSong(com.simplecity.amp_library.model.BlacklistedSong) Song(com.simplecity.amp_library.model.Song) List(java.util.List) Stream(com.annimon.stream.Stream) BriteDatabase(com.squareup.sqlbrite.BriteDatabase) DataManager(com.simplecity.amp_library.utils.DataManager) ContentValues(android.content.ContentValues) Observable(rx.Observable) ContentValues(android.content.ContentValues) BriteDatabase(com.squareup.sqlbrite.BriteDatabase)

Aggregations

Song (com.simplecity.amp_library.model.Song)26 List (java.util.List)14 Intent (android.content.Intent)13 Stream (com.annimon.stream.Stream)12 Album (com.simplecity.amp_library.model.Album)12 Context (android.content.Context)11 ArrayList (java.util.ArrayList)11 Observable (rx.Observable)11 Toast (android.widget.Toast)10 Collectors (com.annimon.stream.Collectors)10 R (com.simplecity.amp_library.R)10 AndroidSchedulers (rx.android.schedulers.AndroidSchedulers)10 Schedulers (rx.schedulers.Schedulers)10 Uri (android.net.Uri)9 AlbumArtist (com.simplecity.amp_library.model.AlbumArtist)9 Playlist (com.simplecity.amp_library.model.Playlist)9 ContentUris (android.content.ContentUris)7 MediaStore (android.provider.MediaStore)7 View (android.view.View)7 Glide (com.bumptech.glide.Glide)7