Giter Club home page Giter Club logo

mp3player's People

Contributors

goldy1992 avatar semantic-release-bot avatar

Stargazers

 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

mp3player's Issues

Add search filter to MainActivity

Add:
search icont
link from material design

When: Search icon is pressed in the MainActivity
Expected: a text box is added. When a character is

  1. typed
  2. deleted
  3. pasted

the recyclerview is filtered with songs that match the criteria specified in the box

Possible functionality: when there is text present in the search box, a clear button (not specified yet) could be displayed, and when pressed would clear the filter and the RecyclerView would display all items.

Version 2
https://developer.android.com/guide/topics/search/search-dialog
Refer to the android documentation on how to set up a search dialog and connect it to the MainActivity

Create Automation script for Instrumented Tests

Write an automation script for linux and windows that will:

  1. upload two folders of test MP3 files to the emulator using the adb interface
  2. run gradlew clean cAT

Alongside this there should be a MockRetriever used to select those files from a specific directory on the emulator and use them for testing.

Improve Dagger Structure

Tidy up the dagger code by

  1. Improving the organisation of modules and components
  2. Avoiding unnecessary provider methods for which all the arguments to the provided object are already provided
  3. Intend to move any logic back to the main package... Dagger should only be used to initialise objects

Resolve notification bar issue

Requirements

WHEN: player is started
THEN: Notification is not displayed (i.e. playerNotificationManager.setPlayer(null) on startup)

WHEN: a song if played or resumed:
THEN: if notification is not displayed, display it, (i.e. playerNotificationManager.setPlayer(player))

WHEN: media player is playing
THEN: notification is active and cannot be removed

WHEN: media player is paused
THEN: notification can be removed

WHEN: back is pressed on the MainActivity and the app is exited
AND: the player is in ANY state
AND: The notification is present
THEN: The notification is NOT removed

WHEN: The media player is playing and the app is removed from the current tasks
THEN: The notification is NOT removed

WHEN: The media player is paused and the app is removed from the current tasks
THEN: The notification is removed

Resolve issue with AudioNoisyBroadcast Receiver and volume control

Issue 1
GIVEN: The use has headphones connected and the song is playing.
WHEN: the use removes the headphones
THEN: the state of the media player changes to paused

Issue 2
GIVEN: the user is on the MainActivity
WHEN: the user presses the volume key
THEN: the system does not register a change on volume

ignore accents in the search algorithm

Given the song title: "cuando suena el río" with accent í
When searching using query "rio"
Then the song should be found

SOLUTION
Create a search database that will take items and store them by their normalised searched criteria along with the id.

i.e.

id title
songs53453 cuando suena el rio
where the original string would be database

Resolve static memory leak warning

StartupProcessor, which is an AsyncTask is referring to the SplashScreenActivity. If the SplashScreenActivity finishes before the AsyncTask has finished, a memory leak could happen as the GC won't clear the references to the SplashScreenActivity in the AsyncTask.

Resolution, make the startup processor a static inner class.

Add shuffle functionality

When the shuffle icon:
baseline-shuffle-black-18.zip
is pressed on the MediaPlayerActivity,

THEN: the next song to be played will be randomly selected from the current playlist.

WHEN: the icon is deselected the next item is reset to be the next item in the list that is currently playing

Implement Audio Noisy functionality

Use the code from other media players as a reference to un-comment the code and register a noisy receiver,
compatible with all versions of android made for the player

Eliminate dpendency on Powermock

  1. Try to use robolectric library instead of mocking static method
  2. Replace the Whitebox.setPrimateMember method with the Apache commons reflect librart FieldUtils.setPrivateField method

If able to eliminate all dependencies then me can remove dependencies from build.gradle file

Performance Improvements

Profile the running of the app using the android studio profilers to find possible bottle necks at runtime.

e.g. One such issue maybe on the skipping of tracks.

Ensure MediaPlayer displays correct meta data

STOP

  1. the old meta data being visible while new metadata is loading
    2 no metadata appearing when entering the MediaPlayerActivity without loading a song

The Ui should wait for all relevant data to be loaded before displaying any information on screen

Investivage performance issue for ANR (Application Not Responding)

02-16 22:49:18.751 1604-1618/system_process E/ActivityManager: ANR in com.example.mike.mp3player PID: 7400 Reason: Broadcast of Intent { act=android.intent.action.MEDIA_BUTTON flg=0x10000010 cmp=com.example.mike.mp3player/androidx.media.session.MediaButtonReceiver bnds=[444,312][580,408] (has extras) } Load: 0.56 / 0.28 / 0.14 CPU usage from 692479ms to 0ms ago: 3.8% 1246/surfaceflinger: 0.2% user + 3.5% kernel / faults: 4 minor 1.1% 1329/mediaserver: 0% user + 1% kernel / faults: 8796 minor 2.1% 1604/system_server: 0.5% user + 1.5% kernel / faults: 10321 minor 0.1% 1713/com.android.systemui: 0% user + 0.1% kernel / faults: 1679 minor 1 major 0.1% 1973/com.android.phone: 0% user + 0.1% kernel / faults: 262 minor 0% 2379/com.google.android.gms: 0% user + 0% kernel / faults: 6634 minor 0% 1281/adbd: 0% user + 0% kernel / faults: 4137 minor 0% 1983/com.android.launcher3: 0% user + 0% kernel / faults: 1745 minor 0% 8/rcu_preempt: 0% user + 0% kernel 0% 7164/kworker/1:1: 0% user + 0% kernel 0% 1958/com.google.android.gms.persistent: 0% user + 0% kernel / faults: 2534 minor 0% 1222/logd: 0% user + 0% kernel / faults: 8 minor 0% 3/ksoftirqd/0: 0% user + 0% kernel 0% 1693/sdcard: 0% user + 0% kernel 0% 7165/kworker/0:1: 0% user + 0% kernel 0% 2076/com.google.android.googlequicksearchbox:search: 0% user + 0% kernel / faults: 1412 minor 0% 1215/kworker/0:1H: 0% user + 0% kernel 0% 1241/healthd: 0% user + 0% kernel 0% 1336/fingerprintd: 0% user + 0% kernel 0% 12/ksoftirqd/1: 0% user + 0% kernel 0% 1327/rild: 0% user + 0% kernel 0% 1321/jbd2/dm-0-8: 0% user + 0% kernel 0% 1242/lmkd: 0% user + 0% kernel 0% 1244/servicemanager: 0% user + 0% kernel 0% 1332/zygote: 0% user + 0% kernel / faults: 4964 minor 0% 3400/com.android.defcontainer: 0% user + 0% kernel / faults: 650 minor 0% 1//init: 0% user + 0% kernel 0% 6/kworker/u4:0: 0% user + 0% kernel 0% 7/migration/0: 0% user + 0% kernel 0% 16/kworker/u4:1: 0% user + 0% kernel 0% 2037/android.process.acore: 0% user + 0% kernel / faults: 7 minor +0% 7198/kworker/0:2: 0% user + 0% kernel +0% 7300/logcat: 0% user + 0% kernel +0% 7349/kworker/1:2: 0% user + 0% kernel +0% 7373/com.android.keychain: 0% user + 0% kernel +0% 7400/com.example.mike.mp3player: 0% user + 0% kernel 3.9% TOTAL: 0.8% user + 2.9% kernel + 0% iowait + 0% softirq CPU usage from 2185ms to 2700ms later: 3.8% 1604/system_server: 3.8% user + 0% kernel 5.7% 1618/ActivityManager: 5.7% user + 0% kernel 1.9% 1619/android.ui: 0% user + 1.9% kernel 1.9% 1645/SensorService: 0% user + 1.9% kernel 1.6% 12/ksoftirqd/1: 0% user + 1.6% kernel 1.6% 1246/surfaceflinger: 0% user + 1.6% kernel 3.3% 1296/surfaceflinger: 0% user + 3.3% kernel 2% TOTAL: 1% user + 1% kernel

Investigate this error on emulators that cause an error when pressing the play/pause button

Remove compile time dagger warnings

Mp3Player\app\src\main\java\com\example\mike\mp3player\dagger\components\MediaActivityCompatComponent.java:39: warning: [Dagger/DuplicateBindings] com.example.mike.mp3player.client.views.adapters.SearchResultAdapter is bound multiple times:
public interface MediaActivityCompatComponent {
       ^
      @Inject com.example.mike.mp3player.client.views.adapters.SearchResultAdapter(com.example.mike.mp3player.client.AlbumArtPainter) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent]
      @Provides com.example.mike.mp3player.client.views.adapters.SearchResultAdapter com.example.mike.mp3player.dagger.modules.SearchResultAdapterModule.provideSearchResultAdapter(com.example.mike.mp3player.client.AlbumArtPainter) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.SearchResultActivitySubComponent]
  This condition was never validated before, and will soon be an error. See https://dagger.dev/conflicting-inject.
      com.example.mike.mp3player.client.views.adapters.SearchResultAdapter is injected at
          com.example.mike.mp3player.client.activities.SearchResultActivity.setSearchResultAdapter(searchResultAdapter)
      com.example.mike.mp3player.client.activities.SearchResultActivityInjector is injected at
          com.example.mike.mp3player.dagger.components.SearchResultActivitySubComponent.inject(com.example.mike.mp3player.client.activities.SearchResultActivityInjector) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.SearchResultActivitySubComponent]
public interface MediaActivityCompatComponent {
       ^
      @Inject com.example.mike.mp3player.client.views.buttons.RepeatOneRepeatAllButton(android.content.Context, com.example.mike.mp3player.client.MediaControllerAdapter, @Named("main") android.os.Handler) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent]
      @Provides com.example.mike.mp3player.client.views.buttons.RepeatOneRepeatAllButton com.example.mike.mp3player.dagger.modules.PlaybackButtonsModule.repeatOneRepeatAllButton(android.content.Context, com.example.mike.mp3player.client.MediaControllerAdapter, @Named("main") android.os.Handler) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent]
  This condition was never validated before, and will soon be an error. See https://dagger.dev/conflicting-inject.
      com.example.mike.mp3player.client.views.buttons.RepeatOneRepeatAllButton is injected at
          com.example.mike.mp3player.client.views.fragments.MediaControlsFragment.setRepeatOneRepeatAllButton(repeatOneRepeatAllButton)
      com.example.mike.mp3player.client.views.fragments.MediaControlsFragment is injected at
          com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent.inject(com.example.mike.mp3player.client.views.fragments.MediaControlsFragment) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent]
Mp3Player\app\src\main\java\com\example\mike\mp3player\dagger\components\MediaActivityCompatComponent.java:39: warning: [Dagger/DuplicateBindings] com.example.mike.mp3player.client.views.buttons.ShuffleButton is bound multiple times:
public interface MediaActivityCompatComponent {
       ^
      @Inject com.example.mike.mp3player.client.views.buttons.ShuffleButton(android.content.Context, com.example.mike.mp3player.client.MediaControllerAdapter, @Named("main") android.os.Handler) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent]
      @Provides com.example.mike.mp3player.client.views.buttons.ShuffleButton com.example.mike.mp3player.dagger.modules.PlaybackButtonsModule.shuffleButton(android.content.Context, com.example.mike.mp3player.client.MediaControllerAdapter, @Named("main") android.os.Handler) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent]
  This condition was never validated before, and will soon be an error. See https://dagger.dev/conflicting-inject.
      com.example.mike.mp3player.client.views.buttons.ShuffleButton is injected at
          com.example.mike.mp3player.client.views.fragments.MediaControlsFragment.setShuffleButton(shuffleButton)
      com.example.mike.mp3player.client.views.fragments.MediaControlsFragment is injected at
          com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent.inject(com.example.mike.mp3player.client.views.fragments.MediaControlsFragment) [com.example.mike.mp3player.dagger.components.MediaActivityCompatComponent ? com.example.mike.mp3player.dagger.components.fragments.PlaybackButtonsSubComponent]
3 warnings

The following warning should be removed at compile time

Add content observer to listen for data changes

At the moment the database that stores the normalised song titles and artists is only over updated once, meaning its will eventually be outdated.

Proposed solution
When the MediaPlaybackService is created add a content observer to android's content resolver and trigger a db update when relevant uri metadata is updated.

Add drag slide change track functionality

On the MediaPlayerActivity
WHEN: the user slides to the left: the next track should slide in from the right
WHEN: to user slides to the right, the previous track should slide in from the left

Create a custom app theme and styles

Create a custom app theme that can be applied to all views in the project

and then different styles to eventually have the option to change the colour scheme of the app in the project settings

Investigate usage of onPrepare.

Being called unexpectedly...
Ideally it should never be called.
Investigate a circumstance when this is called

PROBLEM:
current onPrepare code calls the PlaylistManager getCurrentItem method... The current item is not tracked in this class so could cause potential problems

Fix issues ordering the data in the main activity

Issue 1
Ensure that folder names are displayed in alphabetical order in the MainActivity
Issue 2
Ensure that the alphabetical ordering algorithm DOES NOT consider the case of characters. I.e. convert all strings to uppercase for the purpose of matching

Ensure UI is in sync when theme is changed

GIVEN: when the media session is in state playing
WHEN: the theme is changed
EXPECT: the user interface should show the state as playing
ACTUAL: the play pause button default to being in a paused state

App stuck on loop on first load

When all asks for permissions on the first time opening, it gets stuck on a White screen.

Ensures loading done after permission is accepted

Re-ask for permission if declines

IF the user declines access the external storage:

  1. the app should close

AND WHEN: the user re-opens the app
2) permission should be asked again

Fix button sync issues

Look into the situation where the MediaBrowserService is updated and and the notification UI , media player activity UI or main activity UI is not updated

Add playback speed controls to the MediaPlayerActivity

Have a Plus and minus button along with a label that shows the current playback speed setting on the Media Player View.

A user should be able to press once or hold each button to increase or decrease the playback speed by 0.05 percent every time.

A cuustom action must be added to the Media Browser service in order to augment the playback speed

Improve the touch accuracy of buttons

The following images show that the touch area for the buttons is exactly round the border of the image.

The image must remain the same but the area available for the onclick, i.e. the margin, must be increased, to make it easier for the user to select the option.

image

image

Upgrade to Junit5

Bare in mind that RoboElectric is still not compatible with junit5

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.